annotate Mac/Modules/app/_Appmodule.c @ 27998:e27f58a50737 legacy-trunk

SF bug #690377: Dud footnote reference in distutils docs
author Raymond Hettinger <python@rcn.com>
date Fri, 21 Feb 2003 02:47:09 +0000
parents aef3a03a79f1
children 53e4b7fe0969
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 _App =========================== */
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
6
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
7
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
8 #ifdef _WIN32
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
9 #include "pywintoolbox.h"
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
10 #else
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
11 #include "macglue.h"
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
12 #include "pymactoolbox.h"
21464
b27599abcc49 Updated to Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21442
diff changeset
13 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
14
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
15 /* 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
16 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
17 PyErr_SetString(PyExc_NotImplementedError, \
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
18 "Not available in this shared library/OS version"); \
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19 return NULL; \
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 }} while(0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
21
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
22
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
23 #ifdef WITHOUT_FRAMEWORKS
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
24 #include <Appearance.h>
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
25 #else
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
26 #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
27 #endif
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
28
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
29
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
30
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
31 int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
32 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
33 return PyArg_Parse(v, "(iHH)", &p_itself->state, &p_itself->value, &p_itself->adornment);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
34 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
35
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
36
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 static PyObject *App_Error;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
39 /* ----------------- Object type ThemeDrawingState ------------------ */
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
40
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
41 PyTypeObject ThemeDrawingState_Type;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
42
26720
a12e1727850a Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26610
diff changeset
43 #define ThemeDrawingStateObj_Check(x) ((x)->ob_type == &ThemeDrawingState_Type || PyObject_TypeCheck((x), &ThemeDrawingState_Type))
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
44
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
45 typedef struct ThemeDrawingStateObject {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
46 PyObject_HEAD
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
47 ThemeDrawingState ob_itself;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
48 } ThemeDrawingStateObject;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
49
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
50 PyObject *ThemeDrawingStateObj_New(ThemeDrawingState itself)
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
51 {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
52 ThemeDrawingStateObject *it;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
53 it = PyObject_NEW(ThemeDrawingStateObject, &ThemeDrawingState_Type);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
54 if (it == NULL) return NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
55 it->ob_itself = itself;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
56 return (PyObject *)it;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
57 }
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
58 int ThemeDrawingStateObj_Convert(PyObject *v, ThemeDrawingState *p_itself)
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
59 {
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
60 if (!ThemeDrawingStateObj_Check(v))
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
61 {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
62 PyErr_SetString(PyExc_TypeError, "ThemeDrawingState required");
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
63 return 0;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
64 }
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
65 *p_itself = ((ThemeDrawingStateObject *)v)->ob_itself;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
66 return 1;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
67 }
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
68
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
69 static void ThemeDrawingStateObj_dealloc(ThemeDrawingStateObject *self)
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
70 {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
71 /* Cleanup of self->ob_itself goes here */
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
72 self->ob_type->tp_free((PyObject *)self);
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
73 }
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
74
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
75 static PyObject *ThemeDrawingStateObj_SetThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
76 {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
77 PyObject *_res = NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
78 OSStatus _rv;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
79 Boolean inDisposeNow;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
80 #ifndef SetThemeDrawingState
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
81 PyMac_PRECHECK(SetThemeDrawingState);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
82 #endif
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
83 if (!PyArg_ParseTuple(_args, "b",
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
84 &inDisposeNow))
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
85 return NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
86 _rv = SetThemeDrawingState(_self->ob_itself,
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
87 inDisposeNow);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
88 _res = Py_BuildValue("l",
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
89 _rv);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
90 return _res;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
91 }
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
92
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
93 static PyObject *ThemeDrawingStateObj_DisposeThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
94 {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
95 PyObject *_res = NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
96 OSStatus _rv;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
97 #ifndef DisposeThemeDrawingState
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
98 PyMac_PRECHECK(DisposeThemeDrawingState);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
99 #endif
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
100 if (!PyArg_ParseTuple(_args, ""))
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
101 return NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
102 _rv = DisposeThemeDrawingState(_self->ob_itself);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
103 _res = Py_BuildValue("l",
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
104 _rv);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
105 return _res;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
106 }
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
107
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
108 static PyMethodDef ThemeDrawingStateObj_methods[] = {
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
109 {"SetThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_SetThemeDrawingState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
110 PyDoc_STR("(Boolean inDisposeNow) -> (OSStatus _rv)")},
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
111 {"DisposeThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_DisposeThemeDrawingState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
112 PyDoc_STR("() -> (OSStatus _rv)")},
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
113 {NULL, NULL, 0}
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
114 };
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
115
26464
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
116 #define ThemeDrawingStateObj_getsetlist NULL
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
117
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
118
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
119 #define ThemeDrawingStateObj_compare NULL
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
120
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
121 #define ThemeDrawingStateObj_repr NULL
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
122
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
123 #define ThemeDrawingStateObj_hash NULL
26524
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
124 #define ThemeDrawingStateObj_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
125
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
126 #define ThemeDrawingStateObj_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
127
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
128 static PyObject *ThemeDrawingStateObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
129 {
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
130 PyObject *self;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
131 ThemeDrawingState itself;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
132 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
133
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
134 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, ThemeDrawingStateObj_Convert, &itself)) return NULL;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
135 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
136 ((ThemeDrawingStateObject *)self)->ob_itself = itself;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
137 return self;
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
138 }
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
139
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
140 #define ThemeDrawingStateObj_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
141
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
142
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
143 PyTypeObject ThemeDrawingState_Type = {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
144 PyObject_HEAD_INIT(NULL)
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
145 0, /*ob_size*/
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
146 "_App.ThemeDrawingState", /*tp_name*/
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
147 sizeof(ThemeDrawingStateObject), /*tp_basicsize*/
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
148 0, /*tp_itemsize*/
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
149 /* methods */
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
150 (destructor) ThemeDrawingStateObj_dealloc, /*tp_dealloc*/
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
151 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
152 (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
153 (setattrfunc)0, /*tp_setattr*/
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
154 (cmpfunc) ThemeDrawingStateObj_compare, /*tp_compare*/
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
155 (reprfunc) ThemeDrawingStateObj_repr, /*tp_repr*/
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
156 (PyNumberMethods *)0, /* tp_as_number */
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
157 (PySequenceMethods *)0, /* tp_as_sequence */
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
158 (PyMappingMethods *)0, /* tp_as_mapping */
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
159 (hashfunc) ThemeDrawingStateObj_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
160 0, /*tp_call*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
161 0, /*tp_str*/
14fc187334c5 Converted the Carbon modules to use PEP252-style objects, with
Jack Jansen <jack.jansen@cwi.nl>
parents: 24865
diff changeset
162 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
163 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
164 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
165 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
166 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
167 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
168 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
169 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
170 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
171 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
172 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
173 ThemeDrawingStateObj_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
174 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
175 ThemeDrawingStateObj_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
176 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
177 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
178 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
179 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
180 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
181 ThemeDrawingStateObj_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
182 ThemeDrawingStateObj_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
183 ThemeDrawingStateObj_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
184 ThemeDrawingStateObj_tp_free, /* tp_free */
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
185 };
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
186
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
187 /* --------------- End object type ThemeDrawingState ---------------- */
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
188
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
189
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
190 static PyObject *App_RegisterAppearanceClient(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
191 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
192 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
193 OSStatus _err;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
194 #ifndef RegisterAppearanceClient
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
195 PyMac_PRECHECK(RegisterAppearanceClient);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
196 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
197 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
198 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
199 _err = RegisterAppearanceClient();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
200 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
201 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
202 _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
203 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
204 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
205
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
206 static PyObject *App_UnregisterAppearanceClient(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
207 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
208 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
209 OSStatus _err;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
210 #ifndef UnregisterAppearanceClient
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
211 PyMac_PRECHECK(UnregisterAppearanceClient);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
212 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
213 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
214 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
215 _err = UnregisterAppearanceClient();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
216 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
217 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
218 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
219 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
220 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
221
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
222 static PyObject *App_SetThemePen(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
223 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
224 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
225 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
226 ThemeBrush inBrush;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
227 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
228 Boolean inIsColorDevice;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
229 #ifndef SetThemePen
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
230 PyMac_PRECHECK(SetThemePen);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
231 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
232 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
233 &inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
234 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
235 &inIsColorDevice))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
236 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
237 _err = SetThemePen(inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
238 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
239 inIsColorDevice);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
240 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
241 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
242 _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
243 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
244 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
245
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
246 static PyObject *App_SetThemeBackground(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
247 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
248 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
249 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
250 ThemeBrush inBrush;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
251 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
252 Boolean inIsColorDevice;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
253 #ifndef SetThemeBackground
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
254 PyMac_PRECHECK(SetThemeBackground);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
255 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
256 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
257 &inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
258 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
259 &inIsColorDevice))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
260 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
261 _err = SetThemeBackground(inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
262 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
263 inIsColorDevice);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
264 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
265 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
266 _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
267 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
268 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
269
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
270 static PyObject *App_SetThemeTextColor(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
271 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
272 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
273 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
274 ThemeTextColor inColor;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
275 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
276 Boolean inIsColorDevice;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
277 #ifndef SetThemeTextColor
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
278 PyMac_PRECHECK(SetThemeTextColor);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
279 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
280 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
281 &inColor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
282 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
283 &inIsColorDevice))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
284 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
285 _err = SetThemeTextColor(inColor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
286 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
287 inIsColorDevice);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
288 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
289 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
290 _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
291 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
292 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
293
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
294 static PyObject *App_SetThemeWindowBackground(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
295 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
296 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
297 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
298 WindowPtr inWindow;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
299 ThemeBrush inBrush;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
300 Boolean inUpdate;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
301 #ifndef SetThemeWindowBackground
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
302 PyMac_PRECHECK(SetThemeWindowBackground);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
303 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
304 if (!PyArg_ParseTuple(_args, "O&hb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
305 WinObj_Convert, &inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
306 &inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
307 &inUpdate))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
308 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
309 _err = SetThemeWindowBackground(inWindow,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
310 inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
311 inUpdate);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
312 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
313 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
314 _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
315 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
316 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
317
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
318 static PyObject *App_DrawThemeWindowHeader(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
319 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
320 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
321 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
322 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
323 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
324 #ifndef DrawThemeWindowHeader
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
325 PyMac_PRECHECK(DrawThemeWindowHeader);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
326 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
327 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
328 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
329 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
330 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
331 _err = DrawThemeWindowHeader(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
332 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
333 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
334 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
335 _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
336 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
337 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
338
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
339 static PyObject *App_DrawThemeWindowListViewHeader(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
340 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
341 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
342 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
343 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
344 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
345 #ifndef DrawThemeWindowListViewHeader
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
346 PyMac_PRECHECK(DrawThemeWindowListViewHeader);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
347 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
348 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
349 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
350 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
351 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
352 _err = DrawThemeWindowListViewHeader(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
353 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
354 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
355 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
356 _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
357 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
358 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
359
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
360 static PyObject *App_DrawThemePlacard(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
361 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
362 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
363 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
364 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
365 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
366 #ifndef DrawThemePlacard
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
367 PyMac_PRECHECK(DrawThemePlacard);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
368 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
369 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
370 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
371 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
372 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
373 _err = DrawThemePlacard(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
374 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
375 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
376 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
377 _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
378 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
381 static PyObject *App_DrawThemeEditTextFrame(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
382 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
383 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
384 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
385 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
386 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
387 #ifndef DrawThemeEditTextFrame
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
388 PyMac_PRECHECK(DrawThemeEditTextFrame);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
389 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
390 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
391 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
392 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
393 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
394 _err = DrawThemeEditTextFrame(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
395 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
396 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
397 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
398 _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
399 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
402 static PyObject *App_DrawThemeListBoxFrame(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
403 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
404 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
405 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
406 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
407 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
408 #ifndef DrawThemeListBoxFrame
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
409 PyMac_PRECHECK(DrawThemeListBoxFrame);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
410 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
411 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
412 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
413 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
414 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
415 _err = DrawThemeListBoxFrame(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
416 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
417 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
418 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
419 _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
420 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
421 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
422
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
423 static PyObject *App_DrawThemeFocusRect(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
424 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
425 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
426 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
427 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
428 Boolean inHasFocus;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
429 #ifndef DrawThemeFocusRect
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
430 PyMac_PRECHECK(DrawThemeFocusRect);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
431 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
432 if (!PyArg_ParseTuple(_args, "O&b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
433 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
434 &inHasFocus))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
435 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
436 _err = DrawThemeFocusRect(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
437 inHasFocus);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
438 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
439 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
440 _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
441 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
442 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
444 static PyObject *App_DrawThemePrimaryGroup(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
445 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
446 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
447 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
448 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
449 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
450 #ifndef DrawThemePrimaryGroup
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
451 PyMac_PRECHECK(DrawThemePrimaryGroup);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
452 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
453 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
454 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
455 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
456 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
457 _err = DrawThemePrimaryGroup(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
458 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
459 if (_err != noErr) return PyMac_Error(_err);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
460 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
461 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
462 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
463 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
464
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
465 static PyObject *App_DrawThemeSecondaryGroup(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
466 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
467 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
468 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
469 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
470 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
471 #ifndef DrawThemeSecondaryGroup
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
472 PyMac_PRECHECK(DrawThemeSecondaryGroup);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
473 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
474 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
475 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
476 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
477 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
478 _err = DrawThemeSecondaryGroup(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
479 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
480 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
481 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
482 _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
483 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
484 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
485
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
486 static PyObject *App_DrawThemeSeparator(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
487 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
488 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
489 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
490 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
491 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
492 #ifndef DrawThemeSeparator
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
493 PyMac_PRECHECK(DrawThemeSeparator);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
494 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
495 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
496 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
497 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
498 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
499 _err = DrawThemeSeparator(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
500 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
501 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
502 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
503 _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
504 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
505 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
506
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
507 static PyObject *App_DrawThemeModelessDialogFrame(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
508 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
509 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
510 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
511 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
512 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
513 #ifndef DrawThemeModelessDialogFrame
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
514 PyMac_PRECHECK(DrawThemeModelessDialogFrame);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
515 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
516 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
517 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
518 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
519 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
520 _err = DrawThemeModelessDialogFrame(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
521 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
522 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
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 *App_DrawThemeGenericWell(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
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;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
531 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
532 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
533 ThemeDrawState inState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
534 Boolean inFillCenter;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
535 #ifndef DrawThemeGenericWell
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
536 PyMac_PRECHECK(DrawThemeGenericWell);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
537 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
538 if (!PyArg_ParseTuple(_args, "O&lb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
539 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
540 &inState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
541 &inFillCenter))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
542 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
543 _err = DrawThemeGenericWell(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
544 inState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
545 inFillCenter);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
546 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
547 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
548 _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
549 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
550 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
551
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
552 static PyObject *App_DrawThemeFocusRegion(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
553 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
554 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
555 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
556 Boolean inHasFocus;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
557 #ifndef DrawThemeFocusRegion
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
558 PyMac_PRECHECK(DrawThemeFocusRegion);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
559 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
560 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
561 &inHasFocus))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
562 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
563 _err = DrawThemeFocusRegion((RgnHandle)0,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
564 inHasFocus);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
565 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
566 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
567 _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
568 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
569 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
570
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
571 static PyObject *App_IsThemeInColor(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
572 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
573 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
574 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
575 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
576 Boolean inIsColorDevice;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
577 #ifndef IsThemeInColor
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
578 PyMac_PRECHECK(IsThemeInColor);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
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, "hb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
581 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
582 &inIsColorDevice))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
583 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
584 _rv = IsThemeInColor(inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
585 inIsColorDevice);
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_BuildValue("b",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
587 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
588 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
591 static PyObject *App_GetThemeAccentColors(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
592 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
593 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
594 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
595 CTabHandle outColors;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
596 #ifndef GetThemeAccentColors
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
597 PyMac_PRECHECK(GetThemeAccentColors);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
598 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
599 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
600 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
601 _err = GetThemeAccentColors(&outColors);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
602 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
603 _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
604 ResObj_New, outColors);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
605 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
606 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
607
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
608 static PyObject *App_DrawThemeMenuBarBackground(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
609 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
610 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
611 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
612 Rect inBounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
613 ThemeMenuBarState inState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
614 UInt32 inAttributes;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
615 #ifndef DrawThemeMenuBarBackground
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
616 PyMac_PRECHECK(DrawThemeMenuBarBackground);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
617 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
618 if (!PyArg_ParseTuple(_args, "O&Hl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
619 PyMac_GetRect, &inBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
620 &inState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
621 &inAttributes))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
622 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
623 _err = DrawThemeMenuBarBackground(&inBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
624 inState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
625 inAttributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
626 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
627 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
628 _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
629 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
630 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
631
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
632 static PyObject *App_GetThemeMenuBarHeight(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
633 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
634 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
635 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
636 SInt16 outHeight;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
637 #ifndef GetThemeMenuBarHeight
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
638 PyMac_PRECHECK(GetThemeMenuBarHeight);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
639 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
640 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
641 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
642 _err = GetThemeMenuBarHeight(&outHeight);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
643 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
644 _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
645 outHeight);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
646 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
647 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
648
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
649 static PyObject *App_DrawThemeMenuBackground(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
650 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
651 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
652 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
653 Rect inMenuRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
654 ThemeMenuType inMenuType;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
655 #ifndef DrawThemeMenuBackground
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
656 PyMac_PRECHECK(DrawThemeMenuBackground);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
657 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
658 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
659 PyMac_GetRect, &inMenuRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
660 &inMenuType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
661 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
662 _err = DrawThemeMenuBackground(&inMenuRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
663 inMenuType);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
664 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
665 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
666 _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
667 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
668 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
669
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
670 static PyObject *App_GetThemeMenuBackgroundRegion(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
671 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
672 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
673 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
674 Rect inMenuRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
675 ThemeMenuType menuType;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
676 #ifndef GetThemeMenuBackgroundRegion
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
677 PyMac_PRECHECK(GetThemeMenuBackgroundRegion);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
678 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
679 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
680 PyMac_GetRect, &inMenuRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
681 &menuType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
682 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
683 _err = GetThemeMenuBackgroundRegion(&inMenuRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
684 menuType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
685 (RgnHandle)0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
686 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
687 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
688 _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
689 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
690 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
691
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
692 static PyObject *App_DrawThemeMenuSeparator(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
693 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
694 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
695 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
696 Rect inItemRect;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
697 #ifndef DrawThemeMenuSeparator
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
698 PyMac_PRECHECK(DrawThemeMenuSeparator);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
699 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
700 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
701 PyMac_GetRect, &inItemRect))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
702 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
703 _err = DrawThemeMenuSeparator(&inItemRect);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
704 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
705 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
706 _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
707 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
708 }
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 static PyObject *App_GetThemeMenuSeparatorHeight(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
711 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
712 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
713 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
714 SInt16 outHeight;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
715 #ifndef GetThemeMenuSeparatorHeight
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
716 PyMac_PRECHECK(GetThemeMenuSeparatorHeight);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
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, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
719 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
720 _err = GetThemeMenuSeparatorHeight(&outHeight);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
721 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
722 _res = Py_BuildValue("h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
723 outHeight);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
724 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
725 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
726
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
727 static PyObject *App_GetThemeMenuItemExtra(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
728 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
729 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
730 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
731 ThemeMenuItemType inItemType;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
732 SInt16 outHeight;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
733 SInt16 outWidth;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
734 #ifndef GetThemeMenuItemExtra
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
735 PyMac_PRECHECK(GetThemeMenuItemExtra);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
736 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
737 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
738 &inItemType))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
739 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
740 _err = GetThemeMenuItemExtra(inItemType,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
741 &outHeight,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
742 &outWidth);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
743 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
744 _res = Py_BuildValue("hh",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
745 outHeight,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
746 outWidth);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
747 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
748 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
749
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
750 static PyObject *App_GetThemeMenuTitleExtra(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
751 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
752 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
753 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
754 SInt16 outWidth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
755 Boolean inIsSquished;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
756 #ifndef GetThemeMenuTitleExtra
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
757 PyMac_PRECHECK(GetThemeMenuTitleExtra);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
758 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
759 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
760 &inIsSquished))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
761 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
762 _err = GetThemeMenuTitleExtra(&outWidth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
763 inIsSquished);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
764 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
765 _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
766 outWidth);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
767 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
768 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
769
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
770 static PyObject *App_DrawThemeTabPane(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
771 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
772 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
773 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
774 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
775 ThemeDrawState inState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
776 #ifndef DrawThemeTabPane
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
777 PyMac_PRECHECK(DrawThemeTabPane);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
778 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
779 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
780 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
781 &inState))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
782 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
783 _err = DrawThemeTabPane(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
784 inState);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
785 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
786 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
787 _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
788 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
789 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
790
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
791 static PyObject *App_GetThemeTabRegion(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
792 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
793 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
794 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
795 Rect inRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
796 ThemeTabStyle inStyle;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
797 ThemeTabDirection inDirection;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
798 #ifndef GetThemeTabRegion
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
799 PyMac_PRECHECK(GetThemeTabRegion);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
800 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
801 if (!PyArg_ParseTuple(_args, "O&HH",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
802 PyMac_GetRect, &inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
803 &inStyle,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
804 &inDirection))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
805 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
806 _err = GetThemeTabRegion(&inRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
807 inStyle,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
808 inDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
809 (RgnHandle)0);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
810 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
811 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
812 _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
813 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
814 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
815
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 *App_SetThemeCursor(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
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;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
819 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
820 ThemeCursor inCursor;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
821 #ifndef SetThemeCursor
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
822 PyMac_PRECHECK(SetThemeCursor);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
823 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
824 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
825 &inCursor))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
826 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
827 _err = SetThemeCursor(inCursor);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
828 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
829 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
830 _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
831 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
832 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
833
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
834 static PyObject *App_SetAnimatedThemeCursor(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
835 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
836 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
837 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
838 ThemeCursor inCursor;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
839 UInt32 inAnimationStep;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
840 #ifndef SetAnimatedThemeCursor
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
841 PyMac_PRECHECK(SetAnimatedThemeCursor);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
842 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
843 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
844 &inCursor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
845 &inAnimationStep))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
846 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
847 _err = SetAnimatedThemeCursor(inCursor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
848 inAnimationStep);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
849 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
850 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
851 _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
852 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
853 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
854
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
855 static PyObject *App_GetThemeScrollBarThumbStyle(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
856 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
857 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
858 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
859 ThemeScrollBarThumbStyle outStyle;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
860 #ifndef GetThemeScrollBarThumbStyle
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
861 PyMac_PRECHECK(GetThemeScrollBarThumbStyle);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
862 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
863 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
864 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
865 _err = GetThemeScrollBarThumbStyle(&outStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
866 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
867 _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
868 outStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
869 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
870 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
871
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
872 static PyObject *App_GetThemeScrollBarArrowStyle(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
873 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
874 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
875 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
876 ThemeScrollBarArrowStyle outStyle;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
877 #ifndef GetThemeScrollBarArrowStyle
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
878 PyMac_PRECHECK(GetThemeScrollBarArrowStyle);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
879 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
880 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
881 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
882 _err = GetThemeScrollBarArrowStyle(&outStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
883 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
884 _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
885 outStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
886 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
887 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
888
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
889 static PyObject *App_GetThemeCheckBoxStyle(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
890 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
891 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
892 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
893 ThemeCheckBoxStyle outStyle;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
894 #ifndef GetThemeCheckBoxStyle
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
895 PyMac_PRECHECK(GetThemeCheckBoxStyle);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
896 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
897 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
898 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
899 _err = GetThemeCheckBoxStyle(&outStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
900 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
901 _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
902 outStyle);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
903 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
904 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
905
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
906 static PyObject *App_UseThemeFont(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
907 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
908 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
909 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
910 ThemeFontID inFontID;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
911 ScriptCode inScript;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
912 #ifndef UseThemeFont
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
913 PyMac_PRECHECK(UseThemeFont);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
914 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
915 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
916 &inFontID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
917 &inScript))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
918 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
919 _err = UseThemeFont(inFontID,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
920 inScript);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
921 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
922 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
923 _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
924 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
925 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
926
21617
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
927 static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args)
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
928 {
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
929 PyObject *_res = NULL;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
930 OSStatus _err;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
931 CFStringRef inString;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
932 ThemeFontID inFontID;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
933 ThemeDrawState inState;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
934 Boolean inWrapToWidth;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
935 Rect inBoundingBox;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
936 SInt16 inJust;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
937 #ifndef DrawThemeTextBox
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
938 PyMac_PRECHECK(DrawThemeTextBox);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
939 #endif
21617
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
940 if (!PyArg_ParseTuple(_args, "O&HlbO&h",
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
941 CFStringRefObj_Convert, &inString,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
942 &inFontID,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
943 &inState,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
944 &inWrapToWidth,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
945 PyMac_GetRect, &inBoundingBox,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
946 &inJust))
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
947 return NULL;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
948 _err = DrawThemeTextBox(inString,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
949 inFontID,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
950 inState,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
951 inWrapToWidth,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
952 &inBoundingBox,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
953 inJust,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
954 NULL);
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
955 if (_err != noErr) return PyMac_Error(_err);
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
956 Py_INCREF(Py_None);
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
957 _res = Py_None;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
958 return _res;
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
959 }
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
960
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
961 static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args)
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
962 {
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
963 PyObject *_res = NULL;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
964 OSStatus _err;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
965 CFMutableStringRef inString;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
966 ThemeFontID inFontID;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
967 ThemeDrawState inState;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
968 SInt16 inPixelWidthLimit;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
969 TruncCode inTruncWhere;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
970 Boolean outTruncated;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
971 #ifndef TruncateThemeText
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
972 PyMac_PRECHECK(TruncateThemeText);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
973 #endif
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
974 if (!PyArg_ParseTuple(_args, "O&Hlhh",
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
975 CFMutableStringRefObj_Convert, &inString,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
976 &inFontID,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
977 &inState,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
978 &inPixelWidthLimit,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
979 &inTruncWhere))
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
980 return NULL;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
981 _err = TruncateThemeText(inString,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
982 inFontID,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
983 inState,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
984 inPixelWidthLimit,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
985 inTruncWhere,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
986 &outTruncated);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
987 if (_err != noErr) return PyMac_Error(_err);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
988 _res = Py_BuildValue("b",
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
989 outTruncated);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
990 return _res;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
991 }
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
992
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
993 static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args)
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
994 {
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
995 PyObject *_res = NULL;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
996 OSStatus _err;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
997 CFStringRef inString;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
998 ThemeFontID inFontID;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
999 ThemeDrawState inState;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1000 Boolean inWrapToWidth;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1001 Point ioBounds;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1002 SInt16 outBaseline;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1003 #ifndef GetThemeTextDimensions
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1004 PyMac_PRECHECK(GetThemeTextDimensions);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1005 #endif
21617
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
1006 if (!PyArg_ParseTuple(_args, "O&HlbO&",
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1007 CFStringRefObj_Convert, &inString,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1008 &inFontID,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1009 &inState,
21617
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
1010 &inWrapToWidth,
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
1011 PyMac_GetPoint, &ioBounds))
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1012 return NULL;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1013 _err = GetThemeTextDimensions(inString,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1014 inFontID,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1015 inState,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1016 inWrapToWidth,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1017 &ioBounds,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1018 &outBaseline);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1019 if (_err != noErr) return PyMac_Error(_err);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1020 _res = Py_BuildValue("O&h",
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1021 PyMac_BuildPoint, ioBounds,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1022 outBaseline);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1023 return _res;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1024 }
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1025
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1026 static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args)
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1027 {
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1028 PyObject *_res = NULL;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1029 OSStatus _err;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1030 ThemeFontID inFontID;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1031 ThemeDrawState inState;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1032 Rect outOutset;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1033 #ifndef GetThemeTextShadowOutset
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1034 PyMac_PRECHECK(GetThemeTextShadowOutset);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1035 #endif
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1036 if (!PyArg_ParseTuple(_args, "Hl",
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1037 &inFontID,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1038 &inState))
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1039 return NULL;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1040 _err = GetThemeTextShadowOutset(inFontID,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1041 inState,
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1042 &outOutset);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1043 if (_err != noErr) return PyMac_Error(_err);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1044 _res = Py_BuildValue("O&",
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1045 PyMac_BuildRect, &outOutset);
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1046 return _res;
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1047 }
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1048
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1049 static PyObject *App_DrawThemeScrollBarArrows(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
1050 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1051 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
1052 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1053 Rect bounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1054 ThemeTrackEnableState enableState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1055 ThemeTrackPressState pressState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1056 Boolean isHoriz;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1057 Rect trackBounds;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1058 #ifndef DrawThemeScrollBarArrows
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1059 PyMac_PRECHECK(DrawThemeScrollBarArrows);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1060 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1061 if (!PyArg_ParseTuple(_args, "O&bbb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1062 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
1063 &enableState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1064 &pressState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1065 &isHoriz))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1066 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1067 _err = DrawThemeScrollBarArrows(&bounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1068 enableState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1069 pressState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1070 isHoriz,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1071 &trackBounds);
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 PyMac_BuildRect, &trackBounds);
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 *App_GetThemeScrollBarTrackRect(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
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 Rect bounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1083 ThemeTrackEnableState enableState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1084 ThemeTrackPressState pressState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1085 Boolean isHoriz;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1086 Rect trackBounds;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1087 #ifndef GetThemeScrollBarTrackRect
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1088 PyMac_PRECHECK(GetThemeScrollBarTrackRect);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1089 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1090 if (!PyArg_ParseTuple(_args, "O&bbb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1091 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
1092 &enableState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1093 &pressState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1094 &isHoriz))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1095 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1096 _err = GetThemeScrollBarTrackRect(&bounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1097 enableState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1098 pressState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1099 isHoriz,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1100 &trackBounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1101 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
1102 _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
1103 PyMac_BuildRect, &trackBounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1104 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1105 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1106
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1107 static PyObject *App_HitTestThemeScrollBarArrows(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
1108 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1109 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
1110 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1111 Rect scrollBarBounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1112 ThemeTrackEnableState enableState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1113 ThemeTrackPressState pressState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1114 Boolean isHoriz;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1115 Point ptHit;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1116 Rect trackBounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1117 ControlPartCode partcode;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1118 #ifndef HitTestThemeScrollBarArrows
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1119 PyMac_PRECHECK(HitTestThemeScrollBarArrows);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1120 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1121 if (!PyArg_ParseTuple(_args, "O&bbbO&",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1122 PyMac_GetRect, &scrollBarBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1123 &enableState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1124 &pressState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1125 &isHoriz,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1126 PyMac_GetPoint, &ptHit))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1127 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1128 _rv = HitTestThemeScrollBarArrows(&scrollBarBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1129 enableState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1130 pressState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1131 isHoriz,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1132 ptHit,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1133 &trackBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1134 &partcode);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1135 _res = Py_BuildValue("bO&h",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1136 _rv,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1137 PyMac_BuildRect, &trackBounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1138 partcode);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1139 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1140 }
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 static PyObject *App_DrawThemeScrollBarDelimiters(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
1143 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1144 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
1145 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1146 ThemeWindowType flavor;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1147 Rect inContRect;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1148 ThemeDrawState state;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1149 ThemeWindowAttributes attributes;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1150 #ifndef DrawThemeScrollBarDelimiters
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1151 PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1152 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1153 if (!PyArg_ParseTuple(_args, "HO&ll",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1154 &flavor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1155 PyMac_GetRect, &inContRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1156 &state,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1157 &attributes))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1158 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1159 _err = DrawThemeScrollBarDelimiters(flavor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1160 &inContRect,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1161 state,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1162 attributes);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1163 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
1164 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
1165 _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
1166 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1167 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1168
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1169 static PyObject *App_DrawThemeButton(PyObject *_self, PyObject *_args)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1170 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1171 PyObject *_res = NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1172 OSStatus _err;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1173 Rect inBounds;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1174 UInt16 inKind;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1175 ThemeButtonDrawInfo inNewInfo;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1176 ThemeButtonDrawInfo inPrevInfo;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1177 UInt32 inUserData;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1178 #ifndef DrawThemeButton
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1179 PyMac_PRECHECK(DrawThemeButton);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1180 #endif
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1181 if (!PyArg_ParseTuple(_args, "O&HO&O&l",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1182 PyMac_GetRect, &inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1183 &inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1184 ThemeButtonDrawInfo_Convert, &inNewInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1185 ThemeButtonDrawInfo_Convert, &inPrevInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1186 &inUserData))
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1187 return NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1188 _err = DrawThemeButton(&inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1189 inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1190 &inNewInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1191 &inPrevInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1192 NULL,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1193 NULL,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1194 inUserData);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1195 if (_err != noErr) return PyMac_Error(_err);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1196 Py_INCREF(Py_None);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1197 _res = Py_None;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1198 return _res;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1199 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1200
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1201 static PyObject *App_GetThemeButtonRegion(PyObject *_self, PyObject *_args)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1202 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1203 PyObject *_res = NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1204 OSStatus _err;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1205 Rect inBounds;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1206 UInt16 inKind;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1207 ThemeButtonDrawInfo inNewInfo;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1208 #ifndef GetThemeButtonRegion
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1209 PyMac_PRECHECK(GetThemeButtonRegion);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1210 #endif
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1211 if (!PyArg_ParseTuple(_args, "O&HO&",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1212 PyMac_GetRect, &inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1213 &inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1214 ThemeButtonDrawInfo_Convert, &inNewInfo))
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1215 return NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1216 _err = GetThemeButtonRegion(&inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1217 inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1218 &inNewInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1219 (RgnHandle)0);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1220 if (_err != noErr) return PyMac_Error(_err);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1221 Py_INCREF(Py_None);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1222 _res = Py_None;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1223 return _res;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1224 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1225
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1226 static PyObject *App_GetThemeButtonContentBounds(PyObject *_self, PyObject *_args)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1227 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1228 PyObject *_res = NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1229 OSStatus _err;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1230 Rect inBounds;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1231 UInt16 inKind;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1232 ThemeButtonDrawInfo inDrawInfo;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1233 Rect outBounds;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1234 #ifndef GetThemeButtonContentBounds
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1235 PyMac_PRECHECK(GetThemeButtonContentBounds);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1236 #endif
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1237 if (!PyArg_ParseTuple(_args, "O&HO&",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1238 PyMac_GetRect, &inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1239 &inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1240 ThemeButtonDrawInfo_Convert, &inDrawInfo))
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1241 return NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1242 _err = GetThemeButtonContentBounds(&inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1243 inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1244 &inDrawInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1245 &outBounds);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1246 if (_err != noErr) return PyMac_Error(_err);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1247 _res = Py_BuildValue("O&",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1248 PyMac_BuildRect, &outBounds);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1249 return _res;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1250 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1251
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1252 static PyObject *App_GetThemeButtonBackgroundBounds(PyObject *_self, PyObject *_args)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1253 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1254 PyObject *_res = NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1255 OSStatus _err;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1256 Rect inBounds;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1257 UInt16 inKind;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1258 ThemeButtonDrawInfo inDrawInfo;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1259 Rect outBounds;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1260 #ifndef GetThemeButtonBackgroundBounds
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1261 PyMac_PRECHECK(GetThemeButtonBackgroundBounds);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1262 #endif
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1263 if (!PyArg_ParseTuple(_args, "O&HO&",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1264 PyMac_GetRect, &inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1265 &inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1266 ThemeButtonDrawInfo_Convert, &inDrawInfo))
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1267 return NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1268 _err = GetThemeButtonBackgroundBounds(&inBounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1269 inKind,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1270 &inDrawInfo,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1271 &outBounds);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1272 if (_err != noErr) return PyMac_Error(_err);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1273 _res = Py_BuildValue("O&",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1274 PyMac_BuildRect, &outBounds);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1275 return _res;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1276 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1277
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1278 static PyObject *App_PlayThemeSound(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
1279 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1280 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
1281 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1282 ThemeSoundKind kind;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1283 #ifndef PlayThemeSound
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1284 PyMac_PRECHECK(PlayThemeSound);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1285 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1286 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
1287 PyMac_GetOSType, &kind))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1288 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1289 _err = PlayThemeSound(kind);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1290 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
1291 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
1292 _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
1293 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1294 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1295
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1296 static PyObject *App_BeginThemeDragSound(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
1297 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1298 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
1299 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1300 ThemeDragSoundKind kind;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1301 #ifndef BeginThemeDragSound
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1302 PyMac_PRECHECK(BeginThemeDragSound);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1303 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1304 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
1305 PyMac_GetOSType, &kind))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1306 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1307 _err = BeginThemeDragSound(kind);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1308 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
1309 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
1310 _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
1311 return _res;
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1314 static PyObject *App_EndThemeDragSound(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
1315 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1316 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
1317 OSStatus _err;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1318 #ifndef EndThemeDragSound
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1319 PyMac_PRECHECK(EndThemeDragSound);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
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, ""))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1322 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1323 _err = EndThemeDragSound();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1324 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
1325 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
1326 _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
1327 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1328 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1329
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1330 static PyObject *App_DrawThemeTickMark(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
1331 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1332 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
1333 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1334 Rect bounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1335 ThemeDrawState state;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1336 #ifndef DrawThemeTickMark
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1337 PyMac_PRECHECK(DrawThemeTickMark);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1338 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1339 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
1340 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
1341 &state))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1342 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1343 _err = DrawThemeTickMark(&bounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1344 state);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1345 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
1346 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
1347 _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
1348 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1349 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1350
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1351 static PyObject *App_DrawThemeChasingArrows(PyObject *_self, PyObject *_args)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1352 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1353 PyObject *_res = NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1354 OSStatus _err;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1355 Rect bounds;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1356 UInt32 index;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1357 ThemeDrawState state;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1358 UInt32 eraseData;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1359 #ifndef DrawThemeChasingArrows
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1360 PyMac_PRECHECK(DrawThemeChasingArrows);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1361 #endif
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1362 if (!PyArg_ParseTuple(_args, "O&lll",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1363 PyMac_GetRect, &bounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1364 &index,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1365 &state,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1366 &eraseData))
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1367 return NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1368 _err = DrawThemeChasingArrows(&bounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1369 index,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1370 state,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1371 NULL,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1372 eraseData);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1373 if (_err != noErr) return PyMac_Error(_err);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1374 Py_INCREF(Py_None);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1375 _res = Py_None;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1376 return _res;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1377 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1378
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1379 static PyObject *App_DrawThemePopupArrow(PyObject *_self, PyObject *_args)
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1380 {
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1381 PyObject *_res = NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1382 OSStatus _err;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1383 Rect bounds;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1384 ThemeArrowOrientation orientation;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1385 ThemePopupArrowSize size;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1386 ThemeDrawState state;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1387 UInt32 eraseData;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1388 #ifndef DrawThemePopupArrow
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1389 PyMac_PRECHECK(DrawThemePopupArrow);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1390 #endif
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1391 if (!PyArg_ParseTuple(_args, "O&HHll",
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1392 PyMac_GetRect, &bounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1393 &orientation,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1394 &size,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1395 &state,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1396 &eraseData))
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1397 return NULL;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1398 _err = DrawThemePopupArrow(&bounds,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1399 orientation,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1400 size,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1401 state,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1402 NULL,
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1403 eraseData);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1404 if (_err != noErr) return PyMac_Error(_err);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1405 Py_INCREF(Py_None);
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1406 _res = Py_None;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1407 return _res;
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1408 }
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1409
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1410 static PyObject *App_DrawThemeStandaloneGrowBox(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
1411 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1412 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
1413 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1414 Point origin;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1415 ThemeGrowDirection growDirection;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1416 Boolean isSmall;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1417 ThemeDrawState state;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1418 #ifndef DrawThemeStandaloneGrowBox
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1419 PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1420 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1421 if (!PyArg_ParseTuple(_args, "O&Hbl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1422 PyMac_GetPoint, &origin,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1423 &growDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1424 &isSmall,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1425 &state))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1426 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1427 _err = DrawThemeStandaloneGrowBox(origin,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1428 growDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1429 isSmall,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1430 state);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1431 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
1432 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
1433 _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
1434 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1435 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1436
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1437 static PyObject *App_DrawThemeStandaloneNoGrowBox(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
1438 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1439 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
1440 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1441 Point origin;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1442 ThemeGrowDirection growDirection;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1443 Boolean isSmall;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1444 ThemeDrawState state;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1445 #ifndef DrawThemeStandaloneNoGrowBox
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1446 PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1447 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1448 if (!PyArg_ParseTuple(_args, "O&Hbl",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1449 PyMac_GetPoint, &origin,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1450 &growDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1451 &isSmall,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1452 &state))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1453 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1454 _err = DrawThemeStandaloneNoGrowBox(origin,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1455 growDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1456 isSmall,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1457 state);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1458 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
1459 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
1460 _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
1461 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1462 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1463
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1464 static PyObject *App_GetThemeStandaloneGrowBoxBounds(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
1465 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1466 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
1467 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1468 Point origin;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1469 ThemeGrowDirection growDirection;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1470 Boolean isSmall;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1471 Rect bounds;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1472 #ifndef GetThemeStandaloneGrowBoxBounds
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1473 PyMac_PRECHECK(GetThemeStandaloneGrowBoxBounds);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1474 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1475 if (!PyArg_ParseTuple(_args, "O&Hb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1476 PyMac_GetPoint, &origin,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1477 &growDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1478 &isSmall))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1479 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1480 _err = GetThemeStandaloneGrowBoxBounds(origin,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1481 growDirection,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1482 isSmall,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1483 &bounds);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1484 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
1485 _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
1486 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
1487 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1488 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1489
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1490 static PyObject *App_NormalizeThemeDrawingState(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
1491 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1492 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
1493 OSStatus _err;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1494 #ifndef NormalizeThemeDrawingState
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1495 PyMac_PRECHECK(NormalizeThemeDrawingState);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1496 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1497 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
1498 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1499 _err = NormalizeThemeDrawingState();
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1500 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
1501 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
1502 _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
1503 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1504 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1505
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1506 static PyObject *App_GetThemeDrawingState(PyObject *_self, PyObject *_args)
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1507 {
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1508 PyObject *_res = NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1509 OSStatus _err;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1510 ThemeDrawingState outState;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1511 #ifndef GetThemeDrawingState
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1512 PyMac_PRECHECK(GetThemeDrawingState);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1513 #endif
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1514 if (!PyArg_ParseTuple(_args, ""))
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1515 return NULL;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1516 _err = GetThemeDrawingState(&outState);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1517 if (_err != noErr) return PyMac_Error(_err);
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1518 _res = Py_BuildValue("O&",
21654
29b3dc90be95 Whoops, it's late -- generated output now matches what's checked in...
Just van Rossum <just@letterror.com>
parents: 21653
diff changeset
1519 ThemeDrawingStateObj_New, outState);
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1520 return _res;
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1521 }
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1522
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1523 static PyObject *App_ApplyThemeBackground(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
1524 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1525 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
1526 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1527 ThemeBackgroundKind inKind;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1528 Rect bounds;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1529 ThemeDrawState inState;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1530 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1531 Boolean inColorDev;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1532 #ifndef ApplyThemeBackground
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1533 PyMac_PRECHECK(ApplyThemeBackground);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1534 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1535 if (!PyArg_ParseTuple(_args, "lO&lhb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1536 &inKind,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1537 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
1538 &inState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1539 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1540 &inColorDev))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1541 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1542 _err = ApplyThemeBackground(inKind,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1543 &bounds,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1544 inState,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1545 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1546 inColorDev);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1547 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
1548 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
1549 _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
1550 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1551 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1552
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1553 static PyObject *App_SetThemeTextColorForWindow(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
1554 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1555 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
1556 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1557 WindowPtr window;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1558 Boolean isActive;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1559 SInt16 depth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1560 Boolean isColorDev;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1561 #ifndef SetThemeTextColorForWindow
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1562 PyMac_PRECHECK(SetThemeTextColorForWindow);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1563 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1564 if (!PyArg_ParseTuple(_args, "O&bhb",
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1565 WinObj_Convert, &window,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1566 &isActive,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1567 &depth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1568 &isColorDev))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1569 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1570 _err = SetThemeTextColorForWindow(window,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1571 isActive,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1572 depth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1573 isColorDev);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1574 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
1575 Py_INCREF(Py_None);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1576 _res = Py_None;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1577 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1578 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1579
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1580 static PyObject *App_IsValidAppearanceFileType(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
1581 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1582 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1583 Boolean _rv;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1584 OSType fileType;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1585 #ifndef IsValidAppearanceFileType
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1586 PyMac_PRECHECK(IsValidAppearanceFileType);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1587 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1588 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
1589 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
1590 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1591 _rv = IsValidAppearanceFileType(fileType);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1592 _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
1593 _rv);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1594 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1595 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1596
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1597 static PyObject *App_GetThemeBrushAsColor(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
1598 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1599 PyObject *_res = NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1600 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1601 ThemeBrush inBrush;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1602 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1603 Boolean inColorDev;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1604 RGBColor outColor;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1605 #ifndef GetThemeBrushAsColor
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1606 PyMac_PRECHECK(GetThemeBrushAsColor);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1607 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1608 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
1609 &inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1610 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1611 &inColorDev))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1612 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1613 _err = GetThemeBrushAsColor(inBrush,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1614 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1615 inColorDev,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1616 &outColor);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1617 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
1618 _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
1619 QdRGB_New, &outColor);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1620 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1621 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1622
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1623 static PyObject *App_GetThemeTextColor(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
1624 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1625 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
1626 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1627 ThemeTextColor inColor;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1628 SInt16 inDepth;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1629 Boolean inColorDev;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1630 RGBColor outColor;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1631 #ifndef GetThemeTextColor
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1632 PyMac_PRECHECK(GetThemeTextColor);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1633 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1634 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
1635 &inColor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1636 &inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1637 &inColorDev))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1638 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1639 _err = GetThemeTextColor(inColor,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1640 inDepth,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1641 inColorDev,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1642 &outColor);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1643 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
1644 _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
1645 QdRGB_New, &outColor);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1646 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1647 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1648
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1649 static PyObject *App_GetThemeMetric(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
1650 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1651 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
1652 OSStatus _err;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1653 ThemeMetric inMetric;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1654 SInt32 outMetric;
22505
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1655 #ifndef GetThemeMetric
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1656 PyMac_PRECHECK(GetThemeMetric);
a32c7b3f1f11 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents: 21657
diff changeset
1657 #endif
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1658 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
1659 &inMetric))
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1660 return NULL;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1661 _err = GetThemeMetric(inMetric,
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1662 &outMetric);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1663 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
1664 _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
1665 outMetric);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1666 return _res;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1667 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1668
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1669 static PyMethodDef App_methods[] = {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1670 {"RegisterAppearanceClient", (PyCFunction)App_RegisterAppearanceClient, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1671 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
1672 {"UnregisterAppearanceClient", (PyCFunction)App_UnregisterAppearanceClient, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1673 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
1674 {"SetThemePen", (PyCFunction)App_SetThemePen, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1675 PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1676 {"SetThemeBackground", (PyCFunction)App_SetThemeBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1677 PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1678 {"SetThemeTextColor", (PyCFunction)App_SetThemeTextColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1679 PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1680 {"SetThemeWindowBackground", (PyCFunction)App_SetThemeWindowBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1681 PyDoc_STR("(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1682 {"DrawThemeWindowHeader", (PyCFunction)App_DrawThemeWindowHeader, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1683 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1684 {"DrawThemeWindowListViewHeader", (PyCFunction)App_DrawThemeWindowListViewHeader, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1685 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1686 {"DrawThemePlacard", (PyCFunction)App_DrawThemePlacard, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1687 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1688 {"DrawThemeEditTextFrame", (PyCFunction)App_DrawThemeEditTextFrame, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1689 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1690 {"DrawThemeListBoxFrame", (PyCFunction)App_DrawThemeListBoxFrame, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1691 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1692 {"DrawThemeFocusRect", (PyCFunction)App_DrawThemeFocusRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1693 PyDoc_STR("(Rect inRect, Boolean inHasFocus) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1694 {"DrawThemePrimaryGroup", (PyCFunction)App_DrawThemePrimaryGroup, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1695 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1696 {"DrawThemeSecondaryGroup", (PyCFunction)App_DrawThemeSecondaryGroup, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1697 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1698 {"DrawThemeSeparator", (PyCFunction)App_DrawThemeSeparator, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1699 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1700 {"DrawThemeModelessDialogFrame", (PyCFunction)App_DrawThemeModelessDialogFrame, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1701 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1702 {"DrawThemeGenericWell", (PyCFunction)App_DrawThemeGenericWell, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1703 PyDoc_STR("(Rect inRect, ThemeDrawState inState, Boolean inFillCenter) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1704 {"DrawThemeFocusRegion", (PyCFunction)App_DrawThemeFocusRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1705 PyDoc_STR("(Boolean inHasFocus) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1706 {"IsThemeInColor", (PyCFunction)App_IsThemeInColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1707 PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> (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
1708 {"GetThemeAccentColors", (PyCFunction)App_GetThemeAccentColors, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1709 PyDoc_STR("() -> (CTabHandle outColors)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1710 {"DrawThemeMenuBarBackground", (PyCFunction)App_DrawThemeMenuBarBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1711 PyDoc_STR("(Rect inBounds, ThemeMenuBarState inState, UInt32 inAttributes) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1712 {"GetThemeMenuBarHeight", (PyCFunction)App_GetThemeMenuBarHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1713 PyDoc_STR("() -> (SInt16 outHeight)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1714 {"DrawThemeMenuBackground", (PyCFunction)App_DrawThemeMenuBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1715 PyDoc_STR("(Rect inMenuRect, ThemeMenuType inMenuType) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1716 {"GetThemeMenuBackgroundRegion", (PyCFunction)App_GetThemeMenuBackgroundRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1717 PyDoc_STR("(Rect inMenuRect, ThemeMenuType menuType) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1718 {"DrawThemeMenuSeparator", (PyCFunction)App_DrawThemeMenuSeparator, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1719 PyDoc_STR("(Rect inItemRect) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1720 {"GetThemeMenuSeparatorHeight", (PyCFunction)App_GetThemeMenuSeparatorHeight, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1721 PyDoc_STR("() -> (SInt16 outHeight)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1722 {"GetThemeMenuItemExtra", (PyCFunction)App_GetThemeMenuItemExtra, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1723 PyDoc_STR("(ThemeMenuItemType inItemType) -> (SInt16 outHeight, SInt16 outWidth)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1724 {"GetThemeMenuTitleExtra", (PyCFunction)App_GetThemeMenuTitleExtra, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1725 PyDoc_STR("(Boolean inIsSquished) -> (SInt16 outWidth)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1726 {"DrawThemeTabPane", (PyCFunction)App_DrawThemeTabPane, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1727 PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1728 {"GetThemeTabRegion", (PyCFunction)App_GetThemeTabRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1729 PyDoc_STR("(Rect inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1730 {"SetThemeCursor", (PyCFunction)App_SetThemeCursor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1731 PyDoc_STR("(ThemeCursor inCursor) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1732 {"SetAnimatedThemeCursor", (PyCFunction)App_SetAnimatedThemeCursor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1733 PyDoc_STR("(ThemeCursor inCursor, UInt32 inAnimationStep) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1734 {"GetThemeScrollBarThumbStyle", (PyCFunction)App_GetThemeScrollBarThumbStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1735 PyDoc_STR("() -> (ThemeScrollBarThumbStyle outStyle)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1736 {"GetThemeScrollBarArrowStyle", (PyCFunction)App_GetThemeScrollBarArrowStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1737 PyDoc_STR("() -> (ThemeScrollBarArrowStyle outStyle)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1738 {"GetThemeCheckBoxStyle", (PyCFunction)App_GetThemeCheckBoxStyle, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1739 PyDoc_STR("() -> (ThemeCheckBoxStyle outStyle)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1740 {"UseThemeFont", (PyCFunction)App_UseThemeFont, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1741 PyDoc_STR("(ThemeFontID inFontID, ScriptCode inScript) -> None")},
21617
ccea8782b847 - Added DrawThemeTextBox()
Just van Rossum <just@letterror.com>
parents: 21464
diff changeset
1742 {"DrawThemeTextBox", (PyCFunction)App_DrawThemeTextBox, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1743 PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Rect inBoundingBox, SInt16 inJust) -> None")},
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1744 {"TruncateThemeText", (PyCFunction)App_TruncateThemeText, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1745 PyDoc_STR("(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere) -> (Boolean outTruncated)")},
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1746 {"GetThemeTextDimensions", (PyCFunction)App_GetThemeTextDimensions, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1747 PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Point ioBounds) -> (Point ioBounds, SInt16 outBaseline)")},
21442
d7d25ec02d41 Adapted for Universal Headers 3.4
Jack Jansen <jack.jansen@cwi.nl>
parents: 21113
diff changeset
1748 {"GetThemeTextShadowOutset", (PyCFunction)App_GetThemeTextShadowOutset, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1749 PyDoc_STR("(ThemeFontID inFontID, ThemeDrawState inState) -> (Rect outOutset)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1750 {"DrawThemeScrollBarArrows", (PyCFunction)App_DrawThemeScrollBarArrows, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1751 PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1752 {"GetThemeScrollBarTrackRect", (PyCFunction)App_GetThemeScrollBarTrackRect, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1753 PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1754 {"HitTestThemeScrollBarArrows", (PyCFunction)App_HitTestThemeScrollBarArrows, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1755 PyDoc_STR("(Rect scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit) -> (Boolean _rv, Rect trackBounds, ControlPartCode partcode)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1756 {"DrawThemeScrollBarDelimiters", (PyCFunction)App_DrawThemeScrollBarDelimiters, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1757 PyDoc_STR("(ThemeWindowType flavor, Rect inContRect, ThemeDrawState state, ThemeWindowAttributes attributes) -> None")},
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1758 {"DrawThemeButton", (PyCFunction)App_DrawThemeButton, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1759 PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo, ThemeButtonDrawInfo inPrevInfo, UInt32 inUserData) -> None")},
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1760 {"GetThemeButtonRegion", (PyCFunction)App_GetThemeButtonRegion, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1761 PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo) -> None")},
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1762 {"GetThemeButtonContentBounds", (PyCFunction)App_GetThemeButtonContentBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1763 PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1764 {"GetThemeButtonBackgroundBounds", (PyCFunction)App_GetThemeButtonBackgroundBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1765 PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1766 {"PlayThemeSound", (PyCFunction)App_PlayThemeSound, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1767 PyDoc_STR("(ThemeSoundKind 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
1768 {"BeginThemeDragSound", (PyCFunction)App_BeginThemeDragSound, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1769 PyDoc_STR("(ThemeDragSoundKind 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
1770 {"EndThemeDragSound", (PyCFunction)App_EndThemeDragSound, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1771 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
1772 {"DrawThemeTickMark", (PyCFunction)App_DrawThemeTickMark, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1773 PyDoc_STR("(Rect bounds, ThemeDrawState state) -> None")},
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1774 {"DrawThemeChasingArrows", (PyCFunction)App_DrawThemeChasingArrows, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1775 PyDoc_STR("(Rect bounds, UInt32 index, ThemeDrawState state, UInt32 eraseData) -> None")},
21657
34eddca1fda7 Added support for DrawThemeButton() and friends.
Just van Rossum <just@letterror.com>
parents: 21654
diff changeset
1776 {"DrawThemePopupArrow", (PyCFunction)App_DrawThemePopupArrow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1777 PyDoc_STR("(Rect bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, UInt32 eraseData) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1778 {"DrawThemeStandaloneGrowBox", (PyCFunction)App_DrawThemeStandaloneGrowBox, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1779 PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1780 {"DrawThemeStandaloneNoGrowBox", (PyCFunction)App_DrawThemeStandaloneNoGrowBox, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1781 PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1782 {"GetThemeStandaloneGrowBoxBounds", (PyCFunction)App_GetThemeStandaloneGrowBoxBounds, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1783 PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall) -> (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
1784 {"NormalizeThemeDrawingState", (PyCFunction)App_NormalizeThemeDrawingState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1785 PyDoc_STR("() -> None")},
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1786 {"GetThemeDrawingState", (PyCFunction)App_GetThemeDrawingState, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1787 PyDoc_STR("() -> (ThemeDrawingState outState)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1788 {"ApplyThemeBackground", (PyCFunction)App_ApplyThemeBackground, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1789 PyDoc_STR("(ThemeBackgroundKind inKind, Rect bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1790 {"SetThemeTextColorForWindow", (PyCFunction)App_SetThemeTextColorForWindow, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1791 PyDoc_STR("(WindowPtr window, Boolean isActive, SInt16 depth, Boolean isColorDev) -> None")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1792 {"IsValidAppearanceFileType", (PyCFunction)App_IsValidAppearanceFileType, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1793 PyDoc_STR("(OSType fileType) -> (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
1794 {"GetThemeBrushAsColor", (PyCFunction)App_GetThemeBrushAsColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1795 PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1796 {"GetThemeTextColor", (PyCFunction)App_GetThemeTextColor, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1797 PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1798 {"GetThemeMetric", (PyCFunction)App_GetThemeMetric, 1,
24865
b54cfa98b66b Regenerated with PyDoc_STR() around docstrings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 23261
diff changeset
1799 PyDoc_STR("(ThemeMetric inMetric) -> (SInt32 outMetric)")},
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1800 {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
1801 };
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1802
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1803
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1804
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1805
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1806 void init_App(void)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1807 {
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1808 PyObject *m;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1809 PyObject *d;
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1810
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
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1813
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1814 m = Py_InitModule("_App", App_methods);
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1815 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
1816 App_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
1817 if (App_Error == NULL ||
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1818 PyDict_SetItemString(d, "Error", App_Error) != 0)
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1819 return;
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1820 ThemeDrawingState_Type.ob_type = &PyType_Type;
26769
aef3a03a79f1 - Various tweaks to shut up compiler warnings.
Jack Jansen <jack.jansen@cwi.nl>
parents: 26720
diff changeset
1821 if (PyType_Ready(&ThemeDrawingState_Type) < 0) return;
21653
68834a69746a Q&D support for ThemeDrawingState objects.
Just van Rossum <just@letterror.com>
parents: 21617
diff changeset
1822 Py_INCREF(&ThemeDrawingState_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
1823 PyModule_AddObject(m, "ThemeDrawingState", (PyObject *)&ThemeDrawingState_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
1824 /* 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
1825 Py_INCREF(&ThemeDrawingState_Type);
7aba859cee54 Added PEP253 support to most Carbon modules. This isn't complete yet:
Jack Jansen <jack.jansen@cwi.nl>
parents: 26464
diff changeset
1826 PyModule_AddObject(m, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type);
19443
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1827 }
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1828
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1829 /* ======================== End module _App ========================= */
0922d609acd1 Renamed the Mac toolbox modules to have an initial _ in their name.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1830