2019-10-24 06:36:42 -07:00
|
|
|
/*
|
|
|
|
* Copyright 2019 by its authors. See AUTHORS.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2014-05-02 15:55:51 -07:00
|
|
|
|
|
|
|
#ifndef EFL_CXX_DETAIL_EO_OPS_HH
|
|
|
|
#define EFL_CXX_DETAIL_EO_OPS_HH
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#include <Eo.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace efl { namespace eo { namespace detail {
|
|
|
|
|
|
|
|
inline void
|
|
|
|
init()
|
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
::efl_object_init();
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
|
|
|
shutdown()
|
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
::efl_object_shutdown();
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Eo*
|
2016-03-02 06:32:16 -08:00
|
|
|
ref(Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
return ::efl_ref(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
2016-03-09 13:51:21 -08:00
|
|
|
inline const Eo*
|
|
|
|
ref(const Eo *obj)
|
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
return ::efl_ref(obj);
|
2016-03-09 13:51:21 -08:00
|
|
|
}
|
|
|
|
|
2014-05-02 15:55:51 -07:00
|
|
|
inline void
|
2016-03-09 13:51:21 -08:00
|
|
|
unref(const Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
::efl_unref(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
2017-11-27 23:26:25 -08:00
|
|
|
inline void
|
|
|
|
del(Eo *obj)
|
|
|
|
{
|
|
|
|
::efl_del(obj);
|
|
|
|
}
|
|
|
|
|
2014-05-02 15:55:51 -07:00
|
|
|
inline int
|
2016-03-09 13:51:21 -08:00
|
|
|
ref_get(const Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2017-11-08 01:30:42 -08:00
|
|
|
return ::efl_ref_count(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Eina_Bool
|
2016-08-11 12:24:15 -07:00
|
|
|
isa(const Eo *obj, const Efl_Class *klass)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
return efl_isa(obj, klass);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Eo*
|
2016-08-11 12:24:15 -07:00
|
|
|
add(const Efl_Class *klass, Eo *parent = NULL)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-15 11:14:53 -07:00
|
|
|
Eo *eo = efl_add_ref(klass, parent);
|
2014-05-02 15:55:51 -07:00
|
|
|
return eo;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-08-11 12:24:15 -07:00
|
|
|
dbg_info_get(Eo *obj, Efl_Dbg_Info *info)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_dbg_info_get(obj, info);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
base_data_set(Eo *obj, const char *key, const void *data)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_key_data_set(obj, key, data);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void*
|
2016-03-09 13:51:21 -08:00
|
|
|
base_data_get(const Eo *obj, const char *key)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
|
|
|
void *data;
|
2016-08-11 12:24:15 -07:00
|
|
|
data = efl_key_data_get(obj, key);
|
2014-05-02 15:55:51 -07:00
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
base_data_del(Eo *obj, const char *key)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_key_data_set(obj, key, NULL);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
parent_set(Eo *obj, Eo *parent)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_parent_set(obj, parent);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline Eo*
|
2016-03-09 13:51:21 -08:00
|
|
|
parent_get(const Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
|
|
|
Eo *parent;
|
2016-08-11 12:24:15 -07:00
|
|
|
parent = efl_parent_get(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
return parent;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
event_freeze(Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_event_freeze(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
event_thaw(Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_event_thaw(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline int
|
2016-03-09 13:51:21 -08:00
|
|
|
event_freeze_get(const Eo *obj)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
|
|
|
int count = -1;
|
2016-08-11 12:24:15 -07:00
|
|
|
count = efl_event_freeze_count_get(obj);
|
2014-05-02 15:55:51 -07:00
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
wref_add(Eo *obj, Eo **wref)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_wref_add(obj, wref);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void
|
2016-03-02 06:32:16 -08:00
|
|
|
wref_del(Eo *obj, Eo **wref)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
2016-08-11 12:24:15 -07:00
|
|
|
efl_wref_del(obj, wref);
|
2014-05-02 15:55:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
} } }
|
|
|
|
|
|
|
|
|
|
|
|
#endif // EFL_CXX_DETAIL_EO_OPS_HH
|