summaryrefslogtreecommitdiff
path: root/efl/edje/efl.edje_edit_group.pxi
blob: 60eb4b09ec0836dea80524cddf7e9adfdfe2304c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright (C) 2007-2013 various contributors (see AUTHORS)
#
# This file is part of Python-EFL.
#
# Python-EFL is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# Python-EFL is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this Python-EFL.  If not, see <http://www.gnu.org/licenses/>.


cdef class Group(object):
    cdef EdjeEdit edje

    def __init__(self, EdjeEdit e):
        self.edje = e

    def delete(self):
        return False

    property w_min: # TODO rename to min_w !!
        def __get__(self):
            return edje_edit_group_min_w_get(self.edje.obj)
        def __set__(self, value):
            edje_edit_group_min_w_set(self.edje.obj, value)

    property w_max: # TODO rename to max_w !!
        def __get__(self):
            return edje_edit_group_max_w_get(self.edje.obj)
        def __set__(self, value):
            edje_edit_group_max_w_set(self.edje.obj, value)

    property h_min: # TODO rename to min_h !!
        def __get__(self):
            return edje_edit_group_min_h_get(self.edje.obj)
        def __set__(self, value):
            edje_edit_group_min_h_set(self.edje.obj, value)

    property h_max: # TODO rename to max_h !!
        def __get__(self):
            return edje_edit_group_max_h_get(self.edje.obj)
        def __set__(self, value):
            edje_edit_group_max_h_set(self.edje.obj, value)

    def rename(self, name):
        if isinstance(name, unicode): name = name.encode("UTF-8")
        return bool(edje_edit_group_name_set(self.edje.obj,
                            <const_char *>name if name is not None else NULL))