Package edje :: Module decorators
[hide private]
[frames] | no frames]

Source Code for Module edje.decorators

 1  # Copyright (C) 2007-2008 Gustavo Sverzut Barbieri 
 2  # 
 3  # This file is part of Python-Edje. 
 4  # 
 5  # Python-Edje is free software; you can redistribute it and/or 
 6  # modify it under the terms of the GNU Lesser General Public 
 7  # License as published by the Free Software Foundation; either 
 8  # version 2.1 of the License, or (at your option) any later version. 
 9  # 
10  # Python-Edje 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 GNU 
13  # Lesser General Public License for more details. 
14  # 
15  # You should have received a copy of the GNU Lesser General Public License 
16  # along with this Python-Edje.  If not, see <http://www.gnu.org/licenses/>. 
17   
18 -def signal_callback(emission, source):
19 def deco(func): 20 func.edje_signal_callback = (emission, source) 21 return staticmethod(func)
22 return deco 23 24
25 -def text_change_callback(func):
26 func.edje_text_change_callback = True 27 return staticmethod(func)
28 29
30 -def message_handler(func):
31 func.edje_message_handler = True 32 return staticmethod(func)
33