| 1 | # PySoy's widgets declarations |
|---|
| 2 | # |
|---|
| 3 | # Copyright (C) 2006,2007,2008 PySoy Group |
|---|
| 4 | # |
|---|
| 5 | # This program is free software; you can redistribute it and/or modify |
|---|
| 6 | # it under the terms of the GNU Affero General Public License as published |
|---|
| 7 | # by the Free Software Foundation, either version 3 of the License, or |
|---|
| 8 | # (at your option) any later version. |
|---|
| 9 | # |
|---|
| 10 | # This program is distributed in the hope that it will be useful, |
|---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | # GNU Affero General Public License for more details. |
|---|
| 14 | # |
|---|
| 15 | # You should have received a copy of the GNU Affero General Public License |
|---|
| 16 | # along with this program; if not, see http://www.gnu.org/licenses |
|---|
| 17 | # |
|---|
| 18 | # $Id$ |
|---|
| 19 | |
|---|
| 20 | cimport gl |
|---|
| 21 | cimport stdio |
|---|
| 22 | cimport soy._core |
|---|
| 23 | cimport soy._datatypes |
|---|
| 24 | cimport soy._internals |
|---|
| 25 | cimport soy.bodies |
|---|
| 26 | cimport soy.colors |
|---|
| 27 | cimport soy.textures |
|---|
| 28 | |
|---|
| 29 | # |
|---|
| 30 | # Forward declarations |
|---|
| 31 | # |
|---|
| 32 | cdef class Widget |
|---|
| 33 | cdef class Container(Widget) |
|---|
| 34 | |
|---|
| 35 | cdef class Widget : |
|---|
| 36 | cdef soy._core.Window _window |
|---|
| 37 | cdef Container _parent |
|---|
| 38 | cdef int _alignWidth |
|---|
| 39 | cdef int _alignHeight |
|---|
| 40 | cdef float _aspect |
|---|
| 41 | cdef int _marginTop |
|---|
| 42 | cdef int _marginRight |
|---|
| 43 | cdef int _marginBottom |
|---|
| 44 | cdef int _marginLeft |
|---|
| 45 | cdef soy._internals.AsyncQueue _queue |
|---|
| 46 | cdef int _width |
|---|
| 47 | cdef int _height |
|---|
| 48 | cdef int _xpos |
|---|
| 49 | cdef int _ypos |
|---|
| 50 | cdef object _resizeCallback |
|---|
| 51 | # Helper Functions |
|---|
| 52 | cdef int _setMargin(self, object) |
|---|
| 53 | # _coreLoop Functions |
|---|
| 54 | cdef void _render(self) |
|---|
| 55 | cdef void _resize(self, int, int, int, int) |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | cdef class Canvas (Widget) : |
|---|
| 59 | cdef soy.textures.Texture _texture |
|---|
| 60 | cdef soy._datatypes.Vert _verts[4] |
|---|
| 61 | cdef soy._datatypes.Face _faces[2] |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | cdef class Container (Widget) : |
|---|
| 65 | cdef soy._internals.Children _widgets |
|---|
| 66 | |
|---|
| 67 | cdef class Projector (Widget) : |
|---|
| 68 | cdef soy.bodies.Camera _camera |
|---|
| 69 | cdef int _connected |
|---|