| 1 | n/a | # These are inline-routines/defines, so we do them "by hand" |
|---|
| 2 | n/a | # |
|---|
| 3 | n/a | |
|---|
| 4 | n/a | f = Method(Boolean, 'IsWindowVisible', |
|---|
| 5 | n/a | (WindowRef, 'theWindow', InMode), |
|---|
| 6 | n/a | ) |
|---|
| 7 | n/a | methods.append(f) |
|---|
| 8 | n/a | |
|---|
| 9 | n/a | f = Method(void, 'GetWindowStructureRgn', |
|---|
| 10 | n/a | (WindowRef, 'theWindow', InMode), |
|---|
| 11 | n/a | (RgnHandle, 'r', InMode), |
|---|
| 12 | n/a | ) |
|---|
| 13 | n/a | methods.append(f) |
|---|
| 14 | n/a | |
|---|
| 15 | n/a | f = Method(void, 'GetWindowContentRgn', |
|---|
| 16 | n/a | (WindowRef, 'theWindow', InMode), |
|---|
| 17 | n/a | (RgnHandle, 'r', InMode), |
|---|
| 18 | n/a | ) |
|---|
| 19 | n/a | methods.append(f) |
|---|
| 20 | n/a | |
|---|
| 21 | n/a | f = Method(void, 'GetWindowUpdateRgn', |
|---|
| 22 | n/a | (WindowRef, 'theWindow', InMode), |
|---|
| 23 | n/a | (RgnHandle, 'r', InMode), |
|---|
| 24 | n/a | ) |
|---|
| 25 | n/a | methods.append(f) |
|---|
| 26 | n/a | |
|---|
| 27 | n/a | f = Method(ExistingWindowPtr, 'GetNextWindow', |
|---|
| 28 | n/a | (WindowRef, 'theWindow', InMode), |
|---|
| 29 | n/a | ) |
|---|
| 30 | n/a | methods.append(f) |
|---|
| 31 | n/a | |
|---|
| 32 | n/a | f = Function(short, 'FindWindow', |
|---|
| 33 | n/a | (Point, 'thePoint', InMode), |
|---|
| 34 | n/a | (ExistingWindowPtr, 'theWindow', OutMode), |
|---|
| 35 | n/a | ) |
|---|
| 36 | n/a | functions.append(f) |
|---|
| 37 | n/a | |
|---|
| 38 | n/a | f = Method(void, 'MoveWindow', |
|---|
| 39 | n/a | (WindowPtr, 'theWindow', InMode), |
|---|
| 40 | n/a | (short, 'hGlobal', InMode), |
|---|
| 41 | n/a | (short, 'vGlobal', InMode), |
|---|
| 42 | n/a | (Boolean, 'front', InMode), |
|---|
| 43 | n/a | ) |
|---|
| 44 | n/a | methods.append(f) |
|---|
| 45 | n/a | |
|---|
| 46 | n/a | f = Method(void, 'ShowWindow', |
|---|
| 47 | n/a | (WindowPtr, 'theWindow', InMode), |
|---|
| 48 | n/a | ) |
|---|
| 49 | n/a | methods.append(f) |
|---|
| 50 | n/a | |
|---|
| 51 | n/a | # |
|---|
| 52 | n/a | # A method to set the auto-dispose flag |
|---|
| 53 | n/a | # |
|---|
| 54 | n/a | AutoDispose_body = """ |
|---|
| 55 | n/a | int onoff, old = 0; |
|---|
| 56 | n/a | if (!PyArg_ParseTuple(_args, "i", &onoff)) |
|---|
| 57 | n/a | return NULL; |
|---|
| 58 | n/a | if ( _self->ob_freeit ) |
|---|
| 59 | n/a | old = 1; |
|---|
| 60 | n/a | if ( onoff ) |
|---|
| 61 | n/a | _self->ob_freeit = PyMac_AutoDisposeWindow; |
|---|
| 62 | n/a | else |
|---|
| 63 | n/a | _self->ob_freeit = NULL; |
|---|
| 64 | n/a | _res = Py_BuildValue("i", old); |
|---|
| 65 | n/a | return _res; |
|---|
| 66 | n/a | """ |
|---|
| 67 | n/a | f = ManualGenerator("AutoDispose", AutoDispose_body) |
|---|
| 68 | n/a | f.docstring = lambda: "(int)->int. Automatically DisposeHandle the object on Python object cleanup" |
|---|
| 69 | n/a | methods.append(f) |
|---|