2014-04-14 13:21:03 -07:00
|
|
|
# Copyright (C) 2007-2014 various contributors (see AUTHORS)
|
2013-02-14 12:54:53 -08:00
|
|
|
#
|
|
|
|
# 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
|
2013-12-07 08:54:58 -08:00
|
|
|
# version 3 of the License, or (at your option) any later version.
|
2013-02-14 12:54:53 -08:00
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
|
2013-09-30 18:56:28 -07:00
|
|
|
from efl.eina cimport Eina_Bool
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2013-09-30 18:56:28 -07:00
|
|
|
cdef extern from "Eo.h":
|
2013-02-14 12:54:53 -08:00
|
|
|
####################################################################
|
|
|
|
# Structures
|
|
|
|
#
|
|
|
|
ctypedef struct Eo
|
|
|
|
|
|
|
|
ctypedef struct Eo_Class
|
|
|
|
|
|
|
|
ctypedef struct Eo_Event_Description:
|
2014-04-04 17:13:15 -07:00
|
|
|
const char *name
|
|
|
|
const char *doc
|
2014-04-14 12:41:38 -07:00
|
|
|
Eina_Bool unfreezable
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2013-11-08 21:46:02 -08:00
|
|
|
|
2013-02-14 12:54:53 -08:00
|
|
|
####################################################################
|
|
|
|
# Eo Events
|
|
|
|
#
|
2014-04-04 17:13:15 -07:00
|
|
|
cdef const Eo_Event_Description *EO_EV_DEL
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
|
2013-02-14 12:54:53 -08:00
|
|
|
####################################################################
|
|
|
|
# Other typedefs
|
|
|
|
#
|
2014-04-04 17:13:15 -07:00
|
|
|
ctypedef Eina_Bool (*Eo_Event_Cb)(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
ctypedef void (*eo_key_data_free_func)(void *)
|
2013-02-14 12:54:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
####################################################################
|
|
|
|
# Functions
|
|
|
|
#
|
|
|
|
int eo_init()
|
|
|
|
int eo_shutdown()
|
|
|
|
|
2014-04-04 17:13:15 -07:00
|
|
|
Eo *eo_add(const Eo_Class *klass, Eo *parent, ...)
|
|
|
|
Eo *eo_ref(const Eo *obj)
|
|
|
|
void eo_unref(const Eo *obj)
|
|
|
|
int eo_ref_get(const Eo *obj)
|
|
|
|
void eo_del(const Eo *obj)
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_wref_add(Eo **wref)
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void *eo_do(Eo *obj, ...)
|
2014-04-04 17:13:15 -07:00
|
|
|
const Eo_Class *eo_base_class_get()
|
2013-11-08 21:46:02 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_key_data_set(const char *key, const void *data, eo_key_data_free_func free_func)
|
|
|
|
void *eo_key_data_get(const char *key)
|
|
|
|
void eo_key_data_del(const char *key)
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-04 17:13:15 -07:00
|
|
|
const Eo_Class *eo_class_get(const Eo *obj)
|
|
|
|
const char *eo_class_name_get(const Eo_Class *klass)
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_parent_set(Eo *parent)
|
|
|
|
Eo *eo_parent_get()
|
2013-11-08 21:46:02 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_event_callback_forwarder_add(const Eo_Event_Description *desc, Eo *new_obj)
|
|
|
|
void eo_event_callback_forwarder_del(const Eo_Event_Description *desc, Eo *new_obj)
|
2013-11-08 21:46:02 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_event_freeze()
|
|
|
|
void eo_event_thaw()
|
|
|
|
int eo_event_freeze_get()
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_event_global_freeze()
|
|
|
|
void eo_event_global_thaw()
|
|
|
|
int eo_event_global_freeze_get()
|
2013-02-14 12:54:53 -08:00
|
|
|
|
2014-04-14 12:41:38 -07:00
|
|
|
void eo_event_callback_add(const Eo_Event_Description *desc, Eo_Event_Cb cb, const void *data)
|
|
|
|
void eo_event_callback_del(const Eo_Event_Description *desc, Eo_Event_Cb cb, const void *data)
|