forked from enlightenment/efl
Efl inerfaces: Merge initial efl interfaces work.
This includes the efl interfaces changes as mentioned in: https://phab.enlightenment.org/w/efl_interfaces/ This is still work in progress, but stable enough to be used.
This commit is contained in:
commit
5320b86183
|
@ -128,6 +128,7 @@ pkgconfig_DATA += \
|
|||
pc/eina.pc \
|
||||
pc/eo.pc \
|
||||
pc/eolian.pc \
|
||||
pc/efl.pc \
|
||||
pc/eet.pc \
|
||||
pc/evas.pc \
|
||||
pc/ecore.pc \
|
||||
|
|
21
configure.ac
21
configure.ac
|
@ -1142,6 +1142,16 @@ EFL_INTERNAL_DEPEND_PKG([EOLIAN_CXX], [eo])
|
|||
### Check availability
|
||||
EFL_LIB_END([Eolian_Cxx])
|
||||
|
||||
#### Efl
|
||||
|
||||
EFL_LIB_START([Efl])
|
||||
|
||||
EFL_INTERNAL_DEPEND_PKG([EFL], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([EFL], [eo])
|
||||
|
||||
EFL_LIB_END([Efl])
|
||||
#### End of Efl
|
||||
|
||||
#### Evas
|
||||
EFL_LIB_START_OPTIONAL([Evas], [test "x${build_gui}" = "xyes"])
|
||||
|
||||
|
@ -1556,6 +1566,7 @@ EFL_PLATFORM_DEPEND([EVAS], [all])
|
|||
EFL_INTERNAL_DEPEND_PKG([EVAS], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([EVAS], [eet])
|
||||
EFL_INTERNAL_DEPEND_PKG([EVAS], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([EVAS], [efl])
|
||||
|
||||
EFL_ADD_LIBS([EVAS], [-lm])
|
||||
|
||||
|
@ -2185,6 +2196,7 @@ fi
|
|||
EFL_PLATFORM_DEPEND([ECORE], [all])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE], [efl])
|
||||
|
||||
EFL_ADD_LIBS([ECORE], [-lm])
|
||||
|
||||
|
@ -2600,6 +2612,7 @@ EFL_PLATFORM_DEPEND([ECORE_INPUT_EVAS], [evil])
|
|||
EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore-input])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eina])
|
||||
|
||||
|
@ -3463,6 +3476,7 @@ EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [escape])
|
|||
EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore-imf])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eina])
|
||||
|
||||
|
@ -3630,6 +3644,7 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input])
|
|||
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eet])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eina])
|
||||
|
||||
|
@ -3934,6 +3949,7 @@ EFL_PLATFORM_DEPEND([EPHYSICS], [evil])
|
|||
|
||||
EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eo])
|
||||
|
||||
|
@ -3992,6 +4008,7 @@ EFL_PLATFORM_DEPEND([EDJE], [evil])
|
|||
|
||||
EFL_INTERNAL_DEPEND_PKG([EDJE], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([EDJE], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([EDJE], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([EDJE], [eet])
|
||||
EFL_INTERNAL_DEPEND_PKG([EDJE], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore])
|
||||
|
@ -4114,6 +4131,7 @@ EFL_INTERNAL_DEPEND_PKG([EMOTION], [eo])
|
|||
EFL_INTERNAL_DEPEND_PKG([EMOTION], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([EMOTION], [eet])
|
||||
EFL_INTERNAL_DEPEND_PKG([EMOTION], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([EMOTION], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([EMOTION], [eio])
|
||||
|
||||
EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EMOTION], [${efl_lib_optional_eeze}], [eeze])
|
||||
|
@ -4189,6 +4207,7 @@ EFL_PLATFORM_DEPEND([EINA], [evil])
|
|||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eet])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
|
||||
|
@ -4231,6 +4250,7 @@ EFL_PLATFORM_DEPEND([ETHUMB_CLIENT], [evil])
|
|||
### Checks for libraries
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eo])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [efl])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eet])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
|
||||
EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edje])
|
||||
|
@ -4368,6 +4388,7 @@ pc/eo.pc
|
|||
pc/eo-cxx.pc
|
||||
pc/eolian.pc
|
||||
pc/eolian-cxx.pc
|
||||
pc/efl.pc
|
||||
pc/evas-fb.pc
|
||||
pc/evas-opengl-x11.pc
|
||||
pc/evas-opengl-sdl.pc
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
datarootdir=@datarootdir@
|
||||
datadir=@datadir@
|
||||
eoincludedir=@datadir@/eolian/include
|
||||
eolian_flags=-I${eoincludedir}/efl-@VMAJ@
|
||||
|
||||
Name: Efl
|
||||
Description: EFL's general purpose library
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires.private: @requirements_pc_efl@
|
||||
Libs: -L${libdir} -lefl
|
||||
Libs.private:
|
||||
Cflags: -I${includedir}/efl-@VMAJ@
|
|
@ -6,6 +6,7 @@ EOLIAN_FLAGS = \
|
|||
-I$(srcdir)/lib/eo \
|
||||
-I$(srcdir)/lib/evas/canvas \
|
||||
-I$(srcdir)/lib/edje \
|
||||
-I$(srcdir)/lib/efl/interfaces \
|
||||
-I$(srcdir)/lib/ecore_audio
|
||||
|
||||
ELUA_GEN_FLAGS =
|
||||
|
@ -24,13 +25,12 @@ EXTRA_DIST =
|
|||
|
||||
EFL_INSTALL_EXEC_HOOK=
|
||||
|
||||
include Makefile_Efl.am
|
||||
|
||||
include Makefile_Evil.am
|
||||
include Makefile_Escape.am
|
||||
|
||||
include Makefile_Eina.am
|
||||
include Makefile_Eo.am
|
||||
include Makefile_Efl.am
|
||||
include Makefile_Eet.am
|
||||
include Makefile_Eolian.am
|
||||
include Makefile_Ecore.am
|
||||
|
@ -77,6 +77,7 @@ include Makefile_Eldbus_Cxx.am
|
|||
include Makefile_Eolian_Cxx.am
|
||||
include Makefile_Eet_Cxx.am
|
||||
include Makefile_Eo_Cxx.am
|
||||
include Makefile_Efl_Cxx.am
|
||||
|
||||
include Makefile_Elua.am
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ BUILT_SOURCES += \
|
|||
lib/ecore/ecore_poller.eo.c \
|
||||
lib/ecore/ecore_poller.eo.h \
|
||||
lib/ecore/ecore_poller.eo.legacy.h \
|
||||
lib/ecore/ecore_exe.eo.c \
|
||||
lib/ecore/ecore_exe.eo.h \
|
||||
lib/ecore/ecore_exe.eo.legacy.h \
|
||||
lib/ecore/ecore_job.eo.c \
|
||||
lib/ecore/ecore_job.eo.h \
|
||||
lib/ecore/ecore_job.eo.legacy.h \
|
||||
|
@ -21,6 +24,8 @@ BUILT_SOURCES += \
|
|||
lib/ecore/ecore_animator.eo.c \
|
||||
lib/ecore/ecore_animator.eo.h \
|
||||
lib/ecore/ecore_animator.eo.legacy.h \
|
||||
lib/ecore/ecore_mainloop.eo.c \
|
||||
lib/ecore/ecore_mainloop.eo.h \
|
||||
lib/ecore/ecore_parent.eo.c \
|
||||
lib/ecore/ecore_parent.eo.h
|
||||
|
||||
|
@ -29,10 +34,12 @@ ecoreeolianfiles_DATA = \
|
|||
lib/ecore/ecore_timer.eo \
|
||||
lib/ecore/ecore_poller.eo \
|
||||
lib/ecore/ecore_job.eo \
|
||||
lib/ecore/ecore_exe.eo \
|
||||
lib/ecore/ecore_idler.eo \
|
||||
lib/ecore/ecore_idle_enterer.eo \
|
||||
lib/ecore/ecore_idle_exiter.eo \
|
||||
lib/ecore/ecore_animator.eo \
|
||||
lib/ecore/ecore_mainloop.eo \
|
||||
lib/ecore/ecore_parent.eo
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
@ -51,11 +58,14 @@ lib/ecore/Ecore_Getopt.h
|
|||
nodist_installed_ecoremainheaders_DATA = \
|
||||
lib/ecore/ecore_timer.eo.h \
|
||||
lib/ecore/ecore_poller.eo.h \
|
||||
lib/ecore/ecore_exe.eo.h \
|
||||
lib/ecore/ecore_exe.eo.legacy.h \
|
||||
lib/ecore/ecore_job.eo.h \
|
||||
lib/ecore/ecore_idler.eo.h \
|
||||
lib/ecore/ecore_idle_enterer.eo.h \
|
||||
lib/ecore/ecore_idle_exiter.eo.h \
|
||||
lib/ecore/ecore_animator.eo.h \
|
||||
lib/ecore/ecore_mainloop.eo.h \
|
||||
lib/ecore/ecore_parent.eo.h \
|
||||
lib/ecore/ecore_timer.eo.legacy.h \
|
||||
lib/ecore/ecore_poller.eo.legacy.h \
|
||||
|
|
|
@ -51,6 +51,7 @@ tests_ecore_cxx_ecore_cxx_suite_DEPENDENCIES = @USE_ECORE_INTERNAL_LIBS@
|
|||
|
||||
tests_ecore_cxx_cxx_compile_test_SOURCES = tests/ecore_cxx/cxx_compile_test.cc
|
||||
tests_ecore_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
-I$(top_builddir)/src/lib/efl/interfaces/ \
|
||||
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
|
||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
|
||||
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
|
||||
|
|
|
@ -32,6 +32,7 @@ TESTS += tests/edje_cxx/cxx_compile_test
|
|||
tests_edje_cxx_cxx_compile_test_SOURCES = tests/edje_cxx/cxx_compile_test.cc
|
||||
tests_edje_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
-I$(top_builddir)/src/lib/evas/canvas/ \
|
||||
-I$(top_builddir)/src/lib/efl/interfaces/ \
|
||||
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje_cxx\" \
|
||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edje_cxx\" \
|
||||
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EDJE_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
|
||||
|
|
|
@ -1,3 +1,49 @@
|
|||
BUILT_SOURCES += \
|
||||
lib/efl/interfaces/efl_control.eo.c \
|
||||
lib/efl/interfaces/efl_control.eo.h \
|
||||
lib/efl/interfaces/efl_file.eo.c \
|
||||
lib/efl/interfaces/efl_file.eo.h \
|
||||
lib/efl/interfaces/efl_image.eo.c \
|
||||
lib/efl/interfaces/efl_image.eo.h \
|
||||
lib/efl/interfaces/efl_player.eo.c \
|
||||
lib/efl/interfaces/efl_player.eo.h \
|
||||
lib/efl/interfaces/efl_text.eo.c \
|
||||
lib/efl/interfaces/efl_text.eo.h \
|
||||
lib/efl/interfaces/efl_text_properties.eo.c \
|
||||
lib/efl/interfaces/efl_text_properties.eo.h
|
||||
|
||||
efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@
|
||||
efleolianfiles_DATA = \
|
||||
lib/efl/interfaces/efl_control.eo \
|
||||
lib/efl/interfaces/efl_file.eo \
|
||||
lib/efl/interfaces/efl_image.eo \
|
||||
lib/efl/interfaces/efl_player.eo \
|
||||
lib/efl/interfaces/efl_text.eo \
|
||||
lib/efl/interfaces/efl_text_properties.eo
|
||||
|
||||
EXTRA_DIST += \
|
||||
${efleolianfiles_DATA}
|
||||
|
||||
lib_LTLIBRARIES += lib/efl/libefl.la
|
||||
|
||||
lib_efl_libefl_la_SOURCES = \
|
||||
lib/efl/interfaces/efl_interfaces_main.c
|
||||
|
||||
lib_efl_libefl_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EFL_CFLAGS@
|
||||
lib_efl_libefl_la_LIBADD = @EFL_LIBS@
|
||||
lib_efl_libefl_la_DEPENDENCIES = @EFL_INTERNAL_LIBS@
|
||||
lib_efl_libefl_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
|
||||
|
||||
installed_eflheadersdir = $(includedir)/efl-@VMAJ@
|
||||
dist_installed_eflheaders_DATA = \
|
||||
lib/efl/Efl_Config.h
|
||||
lib/efl/Efl_Config.h \
|
||||
lib/efl/Efl.h
|
||||
|
||||
installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces
|
||||
nodist_installed_eflinterfaces_DATA = \
|
||||
lib/efl/interfaces/efl_control.eo.h \
|
||||
lib/efl/interfaces/efl_file.eo.h \
|
||||
lib/efl/interfaces/efl_image.eo.h \
|
||||
lib/efl/interfaces/efl_player.eo.h \
|
||||
lib/efl/interfaces/efl_text.eo.h \
|
||||
lib/efl/interfaces/efl_text_properties.eo.h
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
if HAVE_CXX11
|
||||
|
||||
### Generated headers
|
||||
|
||||
generated_efl_cxx_bindings = \
|
||||
lib/efl/interfaces/efl_control.eo.hh \
|
||||
lib/efl/interfaces/efl_file.eo.hh \
|
||||
lib/efl/interfaces/efl_image.eo.hh \
|
||||
lib/efl/interfaces/efl_player.eo.hh \
|
||||
lib/efl/interfaces/efl_text.eo.hh \
|
||||
lib/efl/interfaces/efl_text_properties.eo.hh
|
||||
|
||||
lib/efl/Efl.hh: $(generated_efl_cxx_bindings)
|
||||
@echo -e "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
|
||||
@echo -e "#ifdef EFL_BETA_API_SUPPORT" >> $(top_builddir)/src/lib/efl/Efl.hh
|
||||
@for i in $(generated_efl_cxx_bindings); do echo "#include <$$(basename $$i)>" >> $(top_builddir)/src/lib/efl/Efl.hh; done
|
||||
@echo -e "#endif\n\n#endif\n" >> $(top_builddir)/src/lib/efl/Efl.hh
|
||||
|
||||
generated_efl_cxx_all = \
|
||||
$(generated_efl_cxx_bindings) \
|
||||
lib/efl/Efl.hh
|
||||
|
||||
CLEANFILES += $(generated_efl_cxx_all)
|
||||
|
||||
installed_eflcxxmainheadersdir = $(includedir)/efl-cxx-@VMAJ@/
|
||||
nodist_installed_eflcxxmainheaders_DATA = $(generated_efl_cxx_all)
|
||||
|
||||
endif
|
|
@ -1,10 +1,28 @@
|
|||
### Library
|
||||
|
||||
BUILT_SOURCES += \
|
||||
lib/emotion/emotion_object.eo.c \
|
||||
lib/emotion/emotion_object.eo.h \
|
||||
lib/emotion/emotion_object.eo.legacy.h
|
||||
|
||||
emotioneolianfilesdir = $(datadir)/eolian/include/emotion-@VMAJ@
|
||||
emotioneolianfiles_DATA = \
|
||||
lib/emotion/emotion_object.eo
|
||||
|
||||
EXTRA_DIST += \
|
||||
${emotioneolianfiles_DATA}
|
||||
|
||||
lib_LTLIBRARIES += \
|
||||
lib/emotion/libemotion.la
|
||||
|
||||
installed_emotionmainheadersdir = $(includedir)/emotion-@VMAJ@
|
||||
dist_installed_emotionmainheaders_DATA = lib/emotion/Emotion.h
|
||||
dist_installed_emotionmainheaders_DATA = lib/emotion/Emotion.h \
|
||||
lib/emotion/Emotion_Legacy.h \
|
||||
lib/emotion/Emotion_Eo.h
|
||||
|
||||
nodist_installed_emotionmainheaders_DATA = \
|
||||
lib/emotion/emotion_object.eo.h \
|
||||
lib/emotion/emotion_object.eo.legacy.h
|
||||
|
||||
# libemotion.la
|
||||
lib_emotion_libemotion_la_SOURCES = \
|
||||
|
|
|
@ -52,6 +52,7 @@ TESTS += tests/evas_cxx/cxx_compile_test
|
|||
|
||||
tests_evas_cxx_cxx_compile_test_SOURCES = tests/evas_cxx/cxx_compile_test.cc
|
||||
tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
-I$(top_builddir)/src/lib/efl/interfaces/ \
|
||||
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
|
||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evas_cxx\" \
|
||||
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
|
||||
|
|
|
@ -891,7 +891,7 @@ enum _Ecore_Exe_Win32_Priority
|
|||
};
|
||||
typedef enum _Ecore_Exe_Win32_Priority Ecore_Exe_Win32_Priority;
|
||||
|
||||
typedef struct _Ecore_Exe Ecore_Exe; /**< A handle for spawned processes */
|
||||
typedef Eo Ecore_Exe; /**< A handle for spawned processes */
|
||||
|
||||
/**
|
||||
* @typedef Ecore_Exe_Cb Ecore_Exe_Cb
|
||||
|
|
|
@ -55,6 +55,19 @@ extern "C" {
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_Exe_Group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "ecore_exe.eo.h"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_Job_Group
|
||||
*
|
||||
|
@ -63,6 +76,21 @@ extern "C" {
|
|||
|
||||
#include "ecore_job.eo.h"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_MainLoop_Group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "ecore_mainloop.eo.h"
|
||||
|
||||
/* We ue the factory pattern here, so you shouldn't call eo_add directly. */
|
||||
EAPI Eo *ecore_main_loop_get(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -286,6 +286,18 @@ EAPI void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
|
|||
|
||||
#include "ecore_idler.eo.legacy.h"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup Ecore_Exe_Group
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "ecore_exe.eo.legacy.h"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
|
||||
#define MY_CLASS ECORE_EXE_CLASS
|
||||
|
||||
#include <Efl.h>
|
||||
|
||||
/* FIXME: Getting respawn to work
|
||||
*
|
||||
* There is no way that we can do anything about the internal state info of
|
||||
|
@ -45,7 +49,6 @@
|
|||
*
|
||||
* These structure members don't need to change -
|
||||
* __list_data - we stay on the list
|
||||
* ECORE_MAGIC - this is a constant
|
||||
* data - passed in originally
|
||||
* cmd - passed in originally
|
||||
* flags - passed in originally
|
||||
|
@ -84,10 +87,8 @@
|
|||
* hurt. The user code may need to be informed that a timeout is in progress.
|
||||
*/
|
||||
|
||||
struct _Ecore_Exe
|
||||
struct _Ecore_Exe_Data
|
||||
{
|
||||
EINA_INLIST;
|
||||
ECORE_MAGIC;
|
||||
pid_t pid;
|
||||
void *data;
|
||||
char *tag, *cmd;
|
||||
|
@ -120,6 +121,8 @@ struct _Ecore_Exe
|
|||
Ecore_Exe_Cb pre_free_cb;
|
||||
};
|
||||
|
||||
typedef struct _Ecore_Exe_Data Ecore_Exe_Data;
|
||||
|
||||
/* TODO: Something to let people build a command line and does auto escaping -
|
||||
*
|
||||
* ecore_exe_snprintf()
|
||||
|
@ -149,7 +152,7 @@ static Eina_Bool _ecore_exe_data_read_handler(void *data,
|
|||
Ecore_Fd_Handler *fd_handler);
|
||||
static Eina_Bool _ecore_exe_data_write_handler(void *data,
|
||||
Ecore_Fd_Handler *fd_handler);
|
||||
static void _ecore_exe_flush(Ecore_Exe *exe);
|
||||
static void _ecore_exe_flush(Ecore_Exe *obj);
|
||||
static void _ecore_exe_event_exe_data_free(void *data EINA_UNUSED,
|
||||
void *ev);
|
||||
static Ecore_Exe *_ecore_exe_is_it_alive(pid_t pid);
|
||||
|
@ -158,14 +161,14 @@ static Eina_Bool _ecore_exe_make_sure_its_really_dead(void *data);
|
|||
static Ecore_Exe_Event_Add *_ecore_exe_event_add_new(void);
|
||||
static void _ecore_exe_event_add_free(void *data,
|
||||
void *ev);
|
||||
static void _ecore_exe_dead_attach(Ecore_Exe *exe);
|
||||
static void _ecore_exe_dead_attach(Ecore_Exe *obj);
|
||||
|
||||
EAPI int ECORE_EXE_EVENT_ADD = 0;
|
||||
EAPI int ECORE_EXE_EVENT_DEL = 0;
|
||||
EAPI int ECORE_EXE_EVENT_DATA = 0;
|
||||
EAPI int ECORE_EXE_EVENT_ERROR = 0;
|
||||
|
||||
static Ecore_Exe *exes = NULL;
|
||||
static Eina_List *exes = NULL;
|
||||
static const char *shell = NULL;
|
||||
|
||||
/* FIXME: This errno checking stuff should be put elsewhere for everybody to use.
|
||||
|
@ -343,7 +346,33 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
Ecore_Exe_Flags flags,
|
||||
const void *data)
|
||||
{
|
||||
Ecore_Exe *exe = NULL;
|
||||
Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(exe_cmd, flags));
|
||||
if (ret)
|
||||
{
|
||||
Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS);
|
||||
pd->data = (void *) data;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_exe_command_set(Eo *obj EINA_UNUSED, Ecore_Exe_Data *pd, const char *cmd, Ecore_Exe_Flags flags)
|
||||
{
|
||||
pd->cmd = strdup(cmd);
|
||||
pd->flags = flags;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_exe_command_get(Eo *obj EINA_UNUSED, Ecore_Exe_Data *pd, const char **cmd, Ecore_Exe_Flags *flags)
|
||||
{
|
||||
if (cmd) *cmd = pd->cmd;
|
||||
if (flags) *flags = pd->flags;
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
|
||||
{
|
||||
int statusPipe[2] = { -1, -1 };
|
||||
int errorPipe[2] = { -1, -1 };
|
||||
int readPipe[2] = { -1, -1 };
|
||||
|
@ -353,9 +382,10 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
int result;
|
||||
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!exe_cmd) return NULL;
|
||||
exe = calloc(1, sizeof(Ecore_Exe));
|
||||
if (!exe) return NULL;
|
||||
if (!exe->cmd) return NULL;
|
||||
|
||||
const char *exe_cmd = exe->cmd;
|
||||
Ecore_Exe_Flags flags = exe->flags;
|
||||
|
||||
if ((flags & ECORE_EXE_PIPE_AUTO) && (!(flags & ECORE_EXE_PIPE_ERROR))
|
||||
&& (!(flags & ECORE_EXE_PIPE_READ)))
|
||||
|
@ -521,15 +551,13 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
if (pid)
|
||||
{
|
||||
/* Setup the exe structure. */
|
||||
ECORE_MAGIC_SET(exe, ECORE_MAGIC_EXE);
|
||||
exe->start_bytes = -1;
|
||||
exe->end_bytes = -1;
|
||||
exe->start_lines = -1;
|
||||
exe->end_lines = -1;
|
||||
exe->pid = pid;
|
||||
exe->flags = flags;
|
||||
exe->data = (void *)data;
|
||||
if ((exe->cmd = strdup(exe_cmd)))
|
||||
if (exe->cmd)
|
||||
{
|
||||
if (flags & ECORE_EXE_PIPE_ERROR) /* Setup the error stuff. */
|
||||
{
|
||||
|
@ -550,7 +578,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
ecore_main_fd_handler_add(exe->child_fd_error,
|
||||
ECORE_FD_READ,
|
||||
_ecore_exe_data_error_handler,
|
||||
exe, NULL, NULL);
|
||||
obj, NULL, NULL);
|
||||
if (!exe->error_fd_handler)
|
||||
ok = 0;
|
||||
}
|
||||
|
@ -574,7 +602,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
ecore_main_fd_handler_add(exe->child_fd_read,
|
||||
ECORE_FD_READ,
|
||||
_ecore_exe_data_read_handler,
|
||||
exe, NULL, NULL);
|
||||
obj, NULL, NULL);
|
||||
if (!exe->read_fd_handler)
|
||||
ok = 0;
|
||||
}
|
||||
|
@ -598,7 +626,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
ecore_main_fd_handler_add(exe->child_fd_write,
|
||||
ECORE_FD_WRITE,
|
||||
_ecore_exe_data_write_handler,
|
||||
exe, NULL, NULL);
|
||||
obj, NULL, NULL);
|
||||
if (exe->write_fd_handler)
|
||||
ecore_main_fd_handler_active_set(exe->write_fd_handler, 0); /* Nothing to write to start with. */
|
||||
else
|
||||
|
@ -606,7 +634,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
}
|
||||
}
|
||||
|
||||
exes = (Ecore_Exe *)eina_inlist_append(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
|
||||
exes = eina_list_append(exes, obj);
|
||||
n = 0;
|
||||
}
|
||||
else
|
||||
|
@ -618,8 +646,8 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
|
||||
if (!ok) /* Something went wrong, so pull down everything. */
|
||||
{
|
||||
if (exe->pid) ecore_exe_terminate(exe);
|
||||
IF_FN_DEL(ecore_exe_free, exe);
|
||||
if (exe->pid) ecore_exe_terminate(obj);
|
||||
IF_FN_DEL(ecore_exe_free, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -628,7 +656,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
e = _ecore_exe_event_add_new();
|
||||
if (e)
|
||||
{
|
||||
e->exe = exe;
|
||||
e->exe = obj;
|
||||
/* Send the event. */
|
||||
ecore_event_add(ECORE_EXE_EVENT_ADD, e,
|
||||
_ecore_exe_event_add_free, NULL);
|
||||
|
@ -637,36 +665,31 @@ ecore_exe_pipe_run(const char *exe_cmd,
|
|||
}
|
||||
|
||||
errno = n;
|
||||
return exe;
|
||||
return obj;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_callback_pre_free_set(Ecore_Exe *exe,
|
||||
ecore_exe_callback_pre_free_set(Ecore_Exe *obj,
|
||||
Ecore_Exe_Cb func)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE,
|
||||
"ecore_exe_callback_pre_free_set");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
exe->pre_free_cb = func;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_exe_send(Ecore_Exe *exe,
|
||||
ecore_exe_send(Ecore_Exe *obj,
|
||||
const void *data,
|
||||
int size)
|
||||
{
|
||||
void *buf;
|
||||
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_send");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
void *buf;
|
||||
|
||||
if (exe->close_stdin)
|
||||
{
|
||||
|
@ -696,30 +719,27 @@ ecore_exe_send(Ecore_Exe *exe,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_close_stdin(Ecore_Exe *exe)
|
||||
ecore_exe_close_stdin(Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_close_stdin");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
|
||||
exe->close_stdin = 1;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_auto_limits_set(Ecore_Exe *exe,
|
||||
ecore_exe_auto_limits_set(Ecore_Exe *obj,
|
||||
int start_bytes,
|
||||
int end_bytes,
|
||||
int start_lines,
|
||||
int end_lines)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_auto_limits_set");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
/* FIXME: sanitize the input. */
|
||||
exe->start_bytes = start_bytes;
|
||||
exe->end_bytes = end_bytes;
|
||||
|
@ -767,7 +787,7 @@ ecore_exe_auto_limits_set(Ecore_Exe *exe,
|
|||
}
|
||||
|
||||
EAPI Ecore_Exe_Event_Data *
|
||||
ecore_exe_event_data_get(Ecore_Exe *exe,
|
||||
ecore_exe_event_data_get(Ecore_Exe *obj,
|
||||
Ecore_Exe_Flags flags)
|
||||
{
|
||||
Ecore_Exe_Event_Data *e = NULL;
|
||||
|
@ -776,11 +796,9 @@ ecore_exe_event_data_get(Ecore_Exe *exe,
|
|||
int inbuf_num;
|
||||
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_event_data_get");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Sort out what sort of event we are. */
|
||||
if (flags & ECORE_EXE_PIPE_READ)
|
||||
|
@ -815,7 +833,7 @@ ecore_exe_event_data_get(Ecore_Exe *exe,
|
|||
e = calloc(1, sizeof(Ecore_Exe_Event_Data));
|
||||
if (e)
|
||||
{
|
||||
e->exe = exe;
|
||||
e->exe = obj;
|
||||
e->data = inbuf;
|
||||
e->size = inbuf_num;
|
||||
|
||||
|
@ -893,15 +911,14 @@ ecore_exe_event_data_get(Ecore_Exe *exe,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_tag_set(Ecore_Exe *exe,
|
||||
ecore_exe_tag_set(Ecore_Exe *obj,
|
||||
const char *tag)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_tag_set");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
|
||||
IF_FREE(exe->tag);
|
||||
if (tag)
|
||||
exe->tag = strdup(tag);
|
||||
|
@ -910,36 +927,32 @@ ecore_exe_tag_set(Ecore_Exe *exe,
|
|||
}
|
||||
|
||||
EAPI const char *
|
||||
ecore_exe_tag_get(const Ecore_Exe *exe)
|
||||
ecore_exe_tag_get(const Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_tag_get");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return exe->tag;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
ecore_exe_free(Ecore_Exe *exe)
|
||||
ecore_exe_free(Ecore_Exe *obj)
|
||||
{
|
||||
void *data;
|
||||
int ok = 0;
|
||||
int result;
|
||||
|
||||
if (!exe) return NULL;
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_free");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data = exe->data;
|
||||
|
||||
if (exe->pre_free_cb)
|
||||
exe->pre_free_cb(data, exe);
|
||||
exe->pre_free_cb(data, obj);
|
||||
|
||||
if (exe->doomsday_clock)
|
||||
{
|
||||
|
@ -975,10 +988,8 @@ ecore_exe_free(Ecore_Exe *exe)
|
|||
IF_FREE(exe->error_data_buf);
|
||||
IF_FREE(exe->cmd);
|
||||
|
||||
exes = (Ecore_Exe *)eina_inlist_remove(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
|
||||
ECORE_MAGIC_SET(exe, ECORE_MAGIC_NONE);
|
||||
exes = eina_list_remove(exes, obj);
|
||||
IF_FREE(exe->tag);
|
||||
free(exe);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -992,144 +1003,132 @@ ecore_exe_event_data_free(Ecore_Exe_Event_Data *e)
|
|||
}
|
||||
|
||||
EAPI pid_t
|
||||
ecore_exe_pid_get(const Ecore_Exe *exe)
|
||||
ecore_exe_pid_get(const Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pid_get");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return -1;
|
||||
}
|
||||
|
||||
return exe->pid;
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
ecore_exe_cmd_get(const Ecore_Exe *exe)
|
||||
ecore_exe_cmd_get(const Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_cmd_get");
|
||||
return NULL;
|
||||
}
|
||||
return exe->cmd;
|
||||
const char *ret = NULL;
|
||||
|
||||
eo_do(obj, ecore_obj_exe_command_get(&ret, NULL));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
ecore_exe_data_get(const Ecore_Exe *exe)
|
||||
ecore_exe_data_get(const Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return exe->data;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
ecore_exe_data_set(Ecore_Exe *exe,
|
||||
ecore_exe_data_set(Ecore_Exe *obj,
|
||||
void *data)
|
||||
{
|
||||
void *ret;
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, __func__);
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = exe->data;
|
||||
exe->data = data;
|
||||
return ret;
|
||||
}
|
||||
|
||||
EAPI Ecore_Exe_Flags
|
||||
ecore_exe_flags_get(const Ecore_Exe *exe)
|
||||
ecore_exe_flags_get(const Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN_VAL(0);
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return 0;
|
||||
}
|
||||
|
||||
return exe->flags;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_pause(Ecore_Exe *exe)
|
||||
ecore_exe_pause(Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pause");
|
||||
return;
|
||||
}
|
||||
kill(exe->pid, SIGSTOP);
|
||||
eo_do(obj, efl_control_suspend_set(EINA_TRUE));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_continue(Ecore_Exe *exe)
|
||||
ecore_exe_continue(Ecore_Exe *obj)
|
||||
{
|
||||
eo_do(obj, efl_control_suspend_set(EINA_FALSE));
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_exe_efl_control_suspend_set(Eo *obj EINA_UNUSED, Ecore_Exe_Data *exe, Eina_Bool suspend)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_continue");
|
||||
return;
|
||||
}
|
||||
kill(exe->pid, SIGCONT);
|
||||
|
||||
if (suspend)
|
||||
kill(exe->pid, SIGSTOP);
|
||||
else
|
||||
kill(exe->pid, SIGCONT);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_interrupt(Ecore_Exe *exe)
|
||||
ecore_exe_interrupt(Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_interrupt");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
_ecore_exe_dead_attach(exe);
|
||||
|
||||
_ecore_exe_dead_attach(obj);
|
||||
kill(exe->pid, SIGINT);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_quit(Ecore_Exe *exe)
|
||||
ecore_exe_quit(Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_quit");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
_ecore_exe_dead_attach(exe);
|
||||
|
||||
_ecore_exe_dead_attach(obj);
|
||||
kill(exe->pid, SIGQUIT);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_terminate(Ecore_Exe *exe)
|
||||
ecore_exe_terminate(Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_terminate");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
_ecore_exe_dead_attach(exe);
|
||||
|
||||
_ecore_exe_dead_attach(obj);
|
||||
INF("Sending TERM signal to %s (%d).", exe->cmd, exe->pid);
|
||||
kill(exe->pid, SIGTERM);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_kill(Ecore_Exe *exe)
|
||||
ecore_exe_kill(Ecore_Exe *obj)
|
||||
{
|
||||
struct _ecore_exe_dead_exe *dead;
|
||||
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_kill");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
|
||||
dead = calloc(1, sizeof(struct _ecore_exe_dead_exe));
|
||||
if (dead)
|
||||
|
@ -1146,15 +1145,14 @@ ecore_exe_kill(Ecore_Exe *exe)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_signal(Ecore_Exe *exe,
|
||||
ecore_exe_signal(Ecore_Exe *obj,
|
||||
int num)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_signal");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
|
||||
if (num == 1)
|
||||
kill(exe->pid, SIGUSR1);
|
||||
else if (num == 2)
|
||||
|
@ -1162,14 +1160,13 @@ ecore_exe_signal(Ecore_Exe *exe,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_exe_hup(Ecore_Exe *exe)
|
||||
ecore_exe_hup(Ecore_Exe *obj)
|
||||
{
|
||||
EINA_MAIN_LOOP_CHECK_RETURN;
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_hup");
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (!eo_isa(obj, MY_CLASS))
|
||||
return;
|
||||
}
|
||||
|
||||
kill(exe->pid, SIGHUP);
|
||||
}
|
||||
|
||||
|
@ -1201,11 +1198,6 @@ _ecore_exe_is_it_alive(pid_t pid)
|
|||
* I will probably copy my urunlevel code into here someday.
|
||||
*/
|
||||
exe = _ecore_exe_find(pid);
|
||||
if (exe)
|
||||
{
|
||||
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
|
||||
exe = NULL;
|
||||
}
|
||||
|
||||
return exe;
|
||||
}
|
||||
|
@ -1218,10 +1210,11 @@ _ecore_exe_make_sure_its_dead(void *data)
|
|||
dead = data;
|
||||
if (dead)
|
||||
{
|
||||
Ecore_Exe *exe = NULL;
|
||||
Ecore_Exe *obj = NULL;
|
||||
|
||||
if ((exe = _ecore_exe_is_it_alive(dead->pid)))
|
||||
if ((obj = _ecore_exe_is_it_alive(dead->pid)))
|
||||
{
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (dead->cmd)
|
||||
INF("Sending KILL signal to allegedly dead %s (%d).",
|
||||
dead->cmd, dead->pid);
|
||||
|
@ -1250,10 +1243,11 @@ _ecore_exe_make_sure_its_really_dead(void *data)
|
|||
dead = data;
|
||||
if (dead)
|
||||
{
|
||||
Ecore_Exe *exe = NULL;
|
||||
Ecore_Exe *obj = NULL;
|
||||
|
||||
if ((exe = _ecore_exe_is_it_alive(dead->pid)))
|
||||
if ((obj = _ecore_exe_is_it_alive(dead->pid)))
|
||||
{
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
ERR("RUN! The zombie wants to eat your brains! And your CPU!");
|
||||
if (dead->cmd)
|
||||
INF("%s (%d) is not really dead.", dead->cmd, dead->pid);
|
||||
|
@ -1279,33 +1273,39 @@ _ecore_exe_init(void)
|
|||
void
|
||||
_ecore_exe_shutdown(void)
|
||||
{
|
||||
while (exes)
|
||||
ecore_exe_free(exes);
|
||||
Ecore_Exe *exe = NULL;
|
||||
Eina_List *l1, *l2;
|
||||
EINA_LIST_FOREACH_SAFE(exes, l1, l2, exe)
|
||||
ecore_exe_free(exe);
|
||||
}
|
||||
|
||||
Ecore_Exe *
|
||||
_ecore_exe_find(pid_t pid)
|
||||
{
|
||||
Ecore_Exe *exe;
|
||||
Eina_List *itr;
|
||||
Ecore_Exe *obj;
|
||||
|
||||
EINA_INLIST_FOREACH(exes, exe)
|
||||
EINA_LIST_FOREACH(exes, itr, obj)
|
||||
{
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
if (exe->pid == pid)
|
||||
return exe;
|
||||
return obj;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Ecore_Timer *
|
||||
_ecore_exe_doomsday_clock_get(Ecore_Exe *exe)
|
||||
_ecore_exe_doomsday_clock_get(Ecore_Exe *obj)
|
||||
{
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
return exe->doomsday_clock;
|
||||
}
|
||||
|
||||
void
|
||||
_ecore_exe_doomsday_clock_set(Ecore_Exe *exe,
|
||||
_ecore_exe_doomsday_clock_set(Ecore_Exe *obj,
|
||||
Ecore_Timer *dc)
|
||||
{
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
exe->doomsday_clock = dc;
|
||||
}
|
||||
|
||||
|
@ -1427,23 +1427,26 @@ _ecore_exe_data_generic_handler(void *data,
|
|||
Ecore_Fd_Handler *fd_handler,
|
||||
Ecore_Exe_Flags flags)
|
||||
{
|
||||
Ecore_Exe *exe;
|
||||
Ecore_Exe *obj = data;
|
||||
int child_fd;
|
||||
int event_type;
|
||||
const Eo_Event_Description *eo_event = NULL;
|
||||
|
||||
exe = data;
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
|
||||
/* Sort out what sort of handler we are. */
|
||||
if (flags & ECORE_EXE_PIPE_READ)
|
||||
{
|
||||
flags = ECORE_EXE_PIPE_READ;
|
||||
event_type = ECORE_EXE_EVENT_DATA;
|
||||
eo_event = ECORE_EXE_EVENT_DATA_GET;
|
||||
child_fd = exe->child_fd_read;
|
||||
}
|
||||
else
|
||||
{
|
||||
flags = ECORE_EXE_PIPE_ERROR;
|
||||
event_type = ECORE_EXE_EVENT_ERROR;
|
||||
eo_event = ECORE_EXE_EVENT_DATA_ERROR;
|
||||
child_fd = exe->child_fd_error;
|
||||
}
|
||||
|
||||
|
@ -1514,11 +1517,14 @@ _ecore_exe_data_generic_handler(void *data,
|
|||
|
||||
if (!(exe->flags & ECORE_EXE_PIPE_AUTO))
|
||||
{
|
||||
e = ecore_exe_event_data_get(exe, flags);
|
||||
e = ecore_exe_event_data_get(obj, flags);
|
||||
if (e) /* Send the event. */
|
||||
ecore_event_add(event_type, e,
|
||||
_ecore_exe_event_exe_data_free,
|
||||
NULL);
|
||||
{
|
||||
ecore_event_add(event_type, e,
|
||||
_ecore_exe_event_exe_data_free,
|
||||
NULL);
|
||||
eo_do(obj, eo_event_callback_call(eo_event, e));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lost_exe)
|
||||
|
@ -1542,7 +1548,7 @@ _ecore_exe_data_generic_handler(void *data,
|
|||
* mechenism should kick in. But let's give it a good
|
||||
* kick in the head anyway.
|
||||
*/
|
||||
ecore_exe_terminate(exe);
|
||||
ecore_exe_terminate(obj);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1572,13 +1578,13 @@ static Eina_Bool
|
|||
_ecore_exe_data_write_handler(void *data,
|
||||
Ecore_Fd_Handler *fd_handler EINA_UNUSED)
|
||||
{
|
||||
Ecore_Exe *exe;
|
||||
Ecore_Exe *obj = data;
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
|
||||
exe = data;
|
||||
if ((exe->write_fd_handler) &&
|
||||
(ecore_main_fd_handler_active_get
|
||||
(exe->write_fd_handler, ECORE_FD_WRITE)))
|
||||
_ecore_exe_flush(exe);
|
||||
_ecore_exe_flush(obj);
|
||||
|
||||
/* If we have sent all there is to send, and we need to close the pipe, then close it. */
|
||||
if ((exe->close_stdin == 1)
|
||||
|
@ -1600,9 +1606,10 @@ _ecore_exe_data_write_handler(void *data,
|
|||
}
|
||||
|
||||
static void
|
||||
_ecore_exe_flush(Ecore_Exe *exe)
|
||||
_ecore_exe_flush(Ecore_Exe *obj)
|
||||
{
|
||||
int count;
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
|
||||
/* check whether we need to write anything at all. */
|
||||
if ((exe->child_fd_write == -1) || (!exe->write_data_buf))
|
||||
|
@ -1617,7 +1624,7 @@ _ecore_exe_flush(Ecore_Exe *exe)
|
|||
{
|
||||
if (errno == EIO || errno == EBADF || errno == EPIPE || errno == EINVAL || errno == ENOSPC) /* we lost our exe! */
|
||||
{
|
||||
ecore_exe_terminate(exe);
|
||||
ecore_exe_terminate(obj);
|
||||
if (exe->write_fd_handler)
|
||||
ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);
|
||||
}
|
||||
|
@ -1687,9 +1694,10 @@ _ecore_exe_event_del_free(void *data EINA_UNUSED,
|
|||
}
|
||||
|
||||
static void
|
||||
_ecore_exe_dead_attach(Ecore_Exe *exe)
|
||||
_ecore_exe_dead_attach(Ecore_Exe *obj)
|
||||
{
|
||||
struct _ecore_exe_dead_exe *dead;
|
||||
Ecore_Exe_Data *exe = eo_data_scope_get(obj, MY_CLASS);
|
||||
|
||||
if (exe->doomsday_clock_dead) return;
|
||||
dead = calloc(1, sizeof(struct _ecore_exe_dead_exe));
|
||||
|
@ -1704,3 +1712,4 @@ _ecore_exe_dead_attach(Ecore_Exe *exe)
|
|||
}
|
||||
}
|
||||
|
||||
#include "ecore_exe.eo.c"
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
class Ecore.Exe (Eo.Base, Efl.Control)
|
||||
{
|
||||
eo_prefix: ecore_obj_exe;
|
||||
properties {
|
||||
command @constructor {
|
||||
/*@ Control the command that's executed. FIXME: May need a split/rename. */
|
||||
set {
|
||||
legacy: null;
|
||||
}
|
||||
get {
|
||||
legacy: null;
|
||||
}
|
||||
values {
|
||||
const(char) *exe_cmd; /*@ The command to execute. */
|
||||
Ecore_Exe_Flags flags; /*@ The execution flags. */
|
||||
}
|
||||
}
|
||||
}
|
||||
methods {
|
||||
|
||||
}
|
||||
implements {
|
||||
Eo.Base.finalize;
|
||||
Efl.Control.suspend.set;
|
||||
}
|
||||
events {
|
||||
data,get: Ecore_Exe_Event_Data;
|
||||
data,error: Ecore_Exe_Event_Data;
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: Notes:
|
||||
Should run_priority be a class function?
|
||||
Instead of having quit, interrupt, bla bla bla, just have an enum and one function? As it's essentially a signal send.
|
||||
|
||||
Rename the events.
|
||||
*/
|
|
@ -2309,3 +2309,58 @@ _ecore_main_win32_select(int nfds EINA_UNUSED,
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
static Eo *_mainloop_singleton = NULL;
|
||||
|
||||
EAPI Eo *ecore_main_loop_get(void)
|
||||
{
|
||||
if (!_mainloop_singleton)
|
||||
{
|
||||
_mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL);
|
||||
}
|
||||
|
||||
return _mainloop_singleton;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_select_func_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Ecore_Select_Function select_func)
|
||||
{
|
||||
ecore_main_loop_select_func_set(select_func);
|
||||
}
|
||||
|
||||
EOLIAN static Ecore_Select_Function
|
||||
_ecore_mainloop_select_func_get(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
return ecore_main_loop_select_func_get();
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_iterate(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
ecore_main_loop_iterate();
|
||||
}
|
||||
|
||||
EOLIAN static int _ecore_mainloop_iterate_may_block(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, int may_block)
|
||||
{
|
||||
return ecore_main_loop_iterate_may_block(may_block);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_begin(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
ecore_main_loop_begin();
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_ecore_mainloop_quit(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
ecore_main_loop_quit();
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_ecore_mainloop_animator_ticked(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED)
|
||||
{
|
||||
return ecore_main_loop_animator_ticked_get();
|
||||
}
|
||||
|
||||
#include "ecore_mainloop.eo.c"
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
class Ecore_Mainloop (Eo.Base)
|
||||
{
|
||||
legacy_prefix: null;
|
||||
data: null;
|
||||
properties {
|
||||
select_func {
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
Ecore_Select_Function select_func;
|
||||
}
|
||||
}
|
||||
}
|
||||
methods {
|
||||
iterate {
|
||||
}
|
||||
iterate_may_block {
|
||||
return: int;
|
||||
params {
|
||||
int may_block;
|
||||
}
|
||||
}
|
||||
begin {
|
||||
}
|
||||
quit {
|
||||
}
|
||||
animator_ticked {
|
||||
/* FIXME: Should it be a prooperty? */
|
||||
return: Eina_Bool;
|
||||
}
|
||||
}
|
||||
events {
|
||||
idle,enter;
|
||||
idle,exit;
|
||||
idle; /* FIXME: We need to make sure we can get it work. */
|
||||
/* TODO: All of the legacy ecore events. (Ecore.h header) */
|
||||
}
|
||||
}
|
|
@ -1,2 +1,4 @@
|
|||
#include <Efl.h>
|
||||
|
||||
#include "edje_object.eo.h"
|
||||
#include "edje_edit.eo.h"
|
||||
|
|
|
@ -157,5 +157,60 @@ EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord
|
|||
*/
|
||||
EAPI void edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Sets the @b EDJ file (and group within it) to load an Edje
|
||||
* object's contents from
|
||||
*
|
||||
* @return @c EINA_TRUE, on success or @c EINA_FALSE, on errors (check
|
||||
* edje_object_load_error_get() after this call to get errors causes)
|
||||
*
|
||||
* Edje expects EDJ files, which are theming objects' descriptions and
|
||||
* resources packed together in an EET file, to read Edje object
|
||||
* definitions from. They usually are created with the @c .edj
|
||||
* extension. EDJ files, in turn, are assembled from @b textual object
|
||||
* description files, where one describes Edje objects declaratively
|
||||
* -- the EDC files (see @ref edcref "the syntax" for those files).
|
||||
*
|
||||
* Those description files were designed so that many Edje object
|
||||
* definitions -- also called @b groups (or collections) -- could be
|
||||
* packed together <b>in the same EDJ file</b>, so that a whole
|
||||
* application's theme could be packed in one file only. This is the
|
||||
* reason for the @p group argument.
|
||||
*
|
||||
* Use this function after you instantiate a new Edje object, so that
|
||||
* you can "give him life", telling where to get its contents from.
|
||||
*
|
||||
* @see edje_object_add()
|
||||
* @see edje_object_file_get()
|
||||
* @see edje_object_mmap_set()
|
||||
*
|
||||
* @param[in] file The path to the EDJ file to load @p from
|
||||
* @param[in] group The name of the group, in @p file, which implements an
|
||||
Edje object
|
||||
*/
|
||||
EAPI Eina_Bool edje_object_file_set(Eo *obj, const char *file, const char *group);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Get the file and group name that a given Edje object is bound to
|
||||
*
|
||||
* This gets the EDJ file's path, with the respective group set for
|
||||
* the given Edje object. If @a obj is either not an Edje file, or has
|
||||
* not had its file/group set previously, by edje_object_file_set(),
|
||||
* then both @p file and @p group will be set to @c NULL, indicating
|
||||
* an error.
|
||||
*
|
||||
* @see edje_object_file_set()
|
||||
*
|
||||
* @note Use @c NULL pointers on the file/group components you're not
|
||||
* interested in: they'll be ignored by the function.
|
||||
*
|
||||
* @param[out] file The path to the EDJ file to load @p from
|
||||
* @param[out] group The name of the group, in @p file, which implements an
|
||||
Edje object
|
||||
*/
|
||||
EAPI void edje_object_file_get(const Eo *obj, const char **file, const char **group);
|
||||
|
||||
#include "edje_object.eo.legacy.h"
|
||||
#include "edje_edit.eo.legacy.h"
|
||||
|
|
|
@ -2641,7 +2641,7 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
p3->type.common.fill.y,
|
||||
p3->type.common.fill.w,
|
||||
p3->type.common.fill.h),
|
||||
evas_obj_image_smooth_scale_set(p3->smooth),
|
||||
efl_image_smooth_scale_set(p3->smooth),
|
||||
evas_obj_image_source_visible_set(chosen_desc->proxy.source_visible),
|
||||
evas_obj_image_source_clip_set(chosen_desc->proxy.source_clip));
|
||||
}
|
||||
|
@ -2656,7 +2656,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
eo_do(ep->object,
|
||||
evas_obj_image_fill_set(p3->type.common.fill.x, p3->type.common.fill.y,
|
||||
p3->type.common.fill.w, p3->type.common.fill.h),
|
||||
evas_obj_image_smooth_scale_set(p3->smooth));
|
||||
efl_image_smooth_scale_set(p3->smooth));
|
||||
if (chosen_desc->image.border.scale)
|
||||
{
|
||||
if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0))
|
||||
|
|
|
@ -169,7 +169,7 @@ _edje_edit_program_script_free(Program_Script *ps)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_edje_edit_edje_object_file_set(Eo *obj, Edje_Edit *eed, const char *file, const char *group)
|
||||
_edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const char *group)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Eet_File *ef;
|
||||
|
@ -195,7 +195,7 @@ _edje_edit_edje_object_file_set(Eo *obj, Edje_Edit *eed, const char *file, const
|
|||
* groups).
|
||||
*/
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
eo_do_super(obj, MY_CLASS, int_ret = edje_obj_file_set(file, group));
|
||||
eo_do_super(obj, MY_CLASS, int_ret = efl_file_set(file, group));
|
||||
if (!int_ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@ class Edje.Edit (Edje.Object)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Evas.Object_Smart.del;
|
||||
Edje.Object.file.set;
|
||||
Efl.File.file.set;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static int _sort_defined_boxes(const void *a, const void *b);
|
|||
/************************** API Routines **************************/
|
||||
|
||||
EOLIAN void
|
||||
_edje_object_file_get(Eo *obj EINA_UNUSED, Edje *ed, const char **file, const char **group)
|
||||
_edje_object_efl_file_file_get(Eo *obj EINA_UNUSED, Edje *ed, const char **file, const char **group)
|
||||
{
|
||||
if (file) *file = ed->path;
|
||||
if (group) *group = ed->group;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Edje.Object (Evas.Smart_Clipped)
|
||||
class Edje.Object (Evas.Smart_Clipped, Efl.File)
|
||||
{
|
||||
legacy_prefix: edje_object;
|
||||
eo_prefix: edje_obj;
|
||||
|
@ -134,57 +134,6 @@ class Edje.Object (Evas.Smart_Clipped)
|
|||
Edje_Perspective *ps; /*@ The perspective object that will be used. */
|
||||
}
|
||||
}
|
||||
file {
|
||||
set {
|
||||
/*@
|
||||
@brief Sets the @b EDJ file (and group within it) to load an Edje
|
||||
object's contents from
|
||||
|
||||
@return @c EINA_TRUE, on success or @c EINA_FALSE, on errors (check
|
||||
edje_object_load_error_get() after this call to get errors causes)
|
||||
|
||||
Edje expects EDJ files, which are theming objects' descriptions and
|
||||
resources packed together in an EET file, to read Edje object
|
||||
definitions from. They usually are created with the @c .edj
|
||||
extension. EDJ files, in turn, are assembled from @b textual object
|
||||
description files, where one describes Edje objects declaratively
|
||||
-- the EDC files (see @ref edcref "the syntax" for those files).
|
||||
|
||||
Those description files were designed so that many Edje object
|
||||
definitions -- also called @b groups (or collections) -- could be
|
||||
packed together <b>in the same EDJ file</b>, so that a whole
|
||||
application's theme could be packed in one file only. This is the
|
||||
reason for the @p group argument.
|
||||
|
||||
Use this function after you instantiate a new Edje object, so that
|
||||
you can "give him life", telling where to get its contents from.
|
||||
|
||||
@see edje_object_add()
|
||||
@see edje_object_file_get()
|
||||
@see edje_object_mmap_set() */
|
||||
return: bool;
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
@brief Get the file and group name that a given Edje object is bound to
|
||||
|
||||
This gets the EDJ file's path, with the respective group set for
|
||||
the given Edje object. If @a obj is either not an Edje file, or has
|
||||
not had its file/group set previously, by edje_object_file_set(),
|
||||
then both @p file and @p group will be set to @c NULL, indicating
|
||||
an error.
|
||||
|
||||
@see edje_object_file_set()
|
||||
|
||||
@note Use @c NULL pointers on the file/group components you're not
|
||||
interested in: they'll be ignored by the function. */
|
||||
}
|
||||
values {
|
||||
const(char)* file; /*@ The path to the EDJ file to load @p from */
|
||||
const(char)* group; /*@ The name of the group, in @p file, which implements an
|
||||
Edje object */
|
||||
}
|
||||
}
|
||||
scale {
|
||||
set {
|
||||
/*@
|
||||
|
@ -2399,5 +2348,7 @@ class Edje.Object (Evas.Smart_Clipped)
|
|||
Evas.Object_Smart.add;
|
||||
Evas.Object_Smart.del;
|
||||
Evas.Object_Smart.resize;
|
||||
Efl.File.file.set;
|
||||
Efl.File.file.get;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ _edje_object_eo_base_dbg_info_get(Eo *eo_obj, Edje *_pd EINA_UNUSED, Eo_Dbg_Info
|
|||
Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
|
||||
|
||||
const char *file, *edje_group;
|
||||
eo_do(eo_obj, edje_obj_file_get(&file, &edje_group));
|
||||
eo_do(eo_obj, efl_file_get(&file, &edje_group));
|
||||
EO_DBG_INFO_APPEND(group, "File", EINA_VALUE_TYPE_STRING, file);
|
||||
EO_DBG_INFO_APPEND(group, "Group", EINA_VALUE_TYPE_STRING, edje_group);
|
||||
|
||||
|
@ -332,7 +332,7 @@ _edje_object_evas_object_smart_calculate(Eo *obj EINA_UNUSED, Edje *ed)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_edje_object_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, const char *group)
|
||||
_edje_object_efl_file_file_set(Eo *obj, Edje *_pd EINA_UNUSED, const char *file, const char *group)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
Eina_File *f = NULL;
|
||||
|
@ -383,4 +383,19 @@ _edje_object_mmap_set(Eo *obj, Edje *_pd EINA_UNUSED, const Eina_File *f, const
|
|||
return ret;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
edje_object_file_set(Eo *obj, const char *file, const char *group)
|
||||
{
|
||||
Eina_Bool ret = 0;
|
||||
eo_do((Eo *) obj, ret = efl_file_set(file, group));
|
||||
return ret;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
edje_object_file_get(const Eo *obj, const char **file, const char **group)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_file_get(file, group));
|
||||
}
|
||||
|
||||
#include "edje_object.eo.c"
|
||||
|
||||
|
|
|
@ -99,8 +99,8 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
|
||||
evas_obj_text_font_set(font, size),
|
||||
evas_obj_text_set(text),
|
||||
efl_text_properties_font_set(font, size),
|
||||
efl_text_set(text),
|
||||
evas_obj_size_set(sw, sh));
|
||||
|
||||
return text;
|
||||
|
@ -289,13 +289,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
{
|
||||
eo_do(ep->object,
|
||||
|
||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
||||
else evas_obj_text_font_source_set(NULL);
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL);
|
||||
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
|
||||
evas_obj_text_font_set(font, size);
|
||||
evas_obj_text_set(text));
|
||||
efl_text_properties_font_set(font, size);
|
||||
efl_text_set(text));
|
||||
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
/* Find the wanted font size */
|
||||
|
@ -305,12 +305,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
|
||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
||||
else evas_obj_text_font_source_set(NULL);
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL);
|
||||
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
|
||||
evas_obj_text_font_set(font, size));
|
||||
efl_text_properties_font_set(font, size));
|
||||
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
}
|
||||
|
@ -329,13 +329,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
|
||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
||||
else evas_obj_text_font_source_set(NULL);
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL);
|
||||
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
|
||||
evas_obj_text_font_set(font, size);
|
||||
evas_obj_text_set(text));
|
||||
efl_text_properties_font_set(font, size);
|
||||
efl_text_set(text));
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
|
||||
/* only grow the font size if we didn't already reach the max size
|
||||
|
@ -354,11 +354,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
|
||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
||||
else evas_obj_text_font_source_set(NULL);
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL);
|
||||
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
evas_obj_text_font_set(font, size));
|
||||
efl_text_properties_font_set(font, size));
|
||||
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
if ((size > 0) && (th == 0)) break;
|
||||
|
@ -371,7 +371,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
evas_obj_text_font_set(font, 10));
|
||||
efl_text_properties_font_set(font, 10));
|
||||
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
|
||||
|
@ -393,7 +393,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
evas_obj_text_font_set(font, current));
|
||||
efl_text_properties_font_set(font, current));
|
||||
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
|
||||
|
@ -409,7 +409,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
eo_do(ep->object,
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
evas_obj_text_font_set(font, current));
|
||||
efl_text_properties_font_set(font, current));
|
||||
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
} while (th <= sh);
|
||||
|
@ -430,8 +430,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (!chosen_desc->text.min_x)
|
||||
{
|
||||
eo_do(ep->object,
|
||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
||||
else evas_obj_text_font_source_set(NULL));
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL));
|
||||
|
||||
text = _edje_text_fit_x(ed, ep, params, chosen_desc,
|
||||
text, font, size,
|
||||
|
@ -473,13 +473,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
arrange_text:
|
||||
|
||||
eo_do(ep->object,
|
||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
||||
else evas_obj_text_font_source_set(NULL);
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL);
|
||||
|
||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||
|
||||
evas_obj_text_font_set(font, size),
|
||||
evas_obj_text_set(text));
|
||||
efl_text_properties_font_set(font, size),
|
||||
efl_text_set(text));
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
|
||||
/* filters */
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef _EFL_H
|
||||
#define _EFL_H
|
||||
|
||||
#include <Eo.h>
|
||||
|
||||
/* Interfaces */
|
||||
#include "interfaces/efl_control.eo.h"
|
||||
#include "interfaces/efl_file.eo.h"
|
||||
#include "interfaces/efl_image.eo.h"
|
||||
#include "interfaces/efl_player.eo.h"
|
||||
#include "interfaces/efl_text.eo.h"
|
||||
#include "interfaces/efl_text_properties.eo.h"
|
||||
|
||||
#endif
|
|
@ -0,0 +1,27 @@
|
|||
/* FIXME: Rename */
|
||||
|
||||
interface Efl.Control {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
priority {
|
||||
/*@ Control the priority of the object. */
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
int priority; /*@ The priority of the object */
|
||||
}
|
||||
}
|
||||
suspend {
|
||||
/*@ Controls whether the object is suspended or not. */
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
bool suspend; /*@ Controls whether the object is suspended or not. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
interface Efl.File {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
file {
|
||||
set {
|
||||
/*@
|
||||
Set the source file from where an image object must fetch the real
|
||||
image data (it may be an Eet file, besides pure image ones).
|
||||
|
||||
If the file supports multiple data stored in it (as Eet files do),
|
||||
you can specify the key to be used as the index of the image in
|
||||
this file.
|
||||
|
||||
Example:
|
||||
@code
|
||||
img = evas_object_image_add(canvas);
|
||||
evas_object_image_file_set(img, "/path/to/img", NULL);
|
||||
err = evas_object_image_load_error_get(img);
|
||||
if (err != EVAS_LOAD_ERROR_NONE)
|
||||
{
|
||||
fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
|
||||
valid_path, evas_load_error_str(err));
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_image_fill_set(img, 0, 0, w, h);
|
||||
evas_object_resize(img, w, h);
|
||||
evas_object_show(img);
|
||||
}
|
||||
@endcode */
|
||||
|
||||
return: bool;
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieve the source file from where an image object is to fetch the
|
||||
real image data (it may be an Eet file, besides pure image ones).
|
||||
|
||||
You must @b not modify the strings on the returned pointers.
|
||||
|
||||
@note Use @c NULL pointers on the file components you're not
|
||||
interested in: they'll be ignored by the function. */
|
||||
}
|
||||
values {
|
||||
const(char)* file; /*@ The image file path. */
|
||||
const(char)* key; /*@ The image key in @p file (if its an Eet one), or @c
|
||||
NULL, otherwise. */
|
||||
}
|
||||
}
|
||||
}
|
||||
methods {
|
||||
save @const {
|
||||
/*@
|
||||
Save the given image object's contents to an (image) file.
|
||||
|
||||
The extension suffix on @p file will determine which <b>saver
|
||||
module</b> Evas is to use when saving, thus the final file's
|
||||
format. If the file supports multiple data stored in it (Eet ones),
|
||||
you can specify the key to be used as the index of the image in it.
|
||||
|
||||
You can specify some flags when saving the image. Currently
|
||||
acceptable flags are @c quality and @c compress. Eg.: @c
|
||||
"quality=100 compress=9" */
|
||||
|
||||
return: bool;
|
||||
params {
|
||||
@in const(char)* file @nonull; /*@ The filename to be used to save the image (extension
|
||||
obligatory). */
|
||||
@in const(char)* key; /*@ The image key in the file (if an Eet one), or @c NULL,
|
||||
otherwise. */
|
||||
@in const(char)* flags; /*@ String containing the flags to be used (@c NULL for
|
||||
none). */
|
||||
}
|
||||
}
|
||||
eject @const {
|
||||
/*@
|
||||
Eject the represented object.
|
||||
|
||||
Get rid of and clean the pointed resource.
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
interface Efl.Image {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
animated {
|
||||
get {
|
||||
/*@
|
||||
Check if an image can be animated (have multiple frames)
|
||||
|
||||
@return whether the image support animation
|
||||
*/
|
||||
}
|
||||
values {
|
||||
bool is_animated; /*@ If it's animated or not. */
|
||||
}
|
||||
}
|
||||
load_size {
|
||||
set {
|
||||
/*@
|
||||
Set the loading size of an image. The image will be loaded into memory as if it was
|
||||
the set size instead of the original size. This can save a lot of memory, and is
|
||||
important for scalable types like svg.
|
||||
*/
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
int w; /*@ The new width of the image's load size. */
|
||||
int h; /*@ The new height of the image's load size. */
|
||||
}
|
||||
}
|
||||
smooth_scale {
|
||||
set {
|
||||
/*@
|
||||
Sets whether to use high-quality image scaling algorithm on the
|
||||
given image.
|
||||
|
||||
When enabled, a higher quality image scaling algorithm is used when
|
||||
scaling images to sizes other than the source image's original
|
||||
one. This gives better results but is more computationally
|
||||
expensive.
|
||||
*/
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieves whether the given image is using high-quality
|
||||
image scaling algorithm.
|
||||
|
||||
@return Whether smooth scale is being used.
|
||||
*/
|
||||
}
|
||||
values {
|
||||
bool smooth_scale; /*@ Whether to use smooth scale or not. */
|
||||
}
|
||||
}
|
||||
ratio {
|
||||
get {
|
||||
/*@
|
||||
The native ration of the image object
|
||||
*/
|
||||
}
|
||||
values {
|
||||
double ratio; /*@ The image's ratio */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <Efl.h>
|
||||
|
||||
#include "interfaces/efl_control.eo.c"
|
||||
#include "interfaces/efl_file.eo.c"
|
||||
#include "interfaces/efl_image.eo.c"
|
||||
#include "interfaces/efl_player.eo.c"
|
||||
#include "interfaces/efl_text.eo.c"
|
||||
#include "interfaces/efl_text_properties.eo.c"
|
|
@ -0,0 +1,109 @@
|
|||
interface Efl.Player {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
play {
|
||||
set {
|
||||
/*@
|
||||
* @brief Set play/pause state of the media file.
|
||||
*
|
||||
* This functions sets the currently playing status of the video. Using this
|
||||
* function to play or pause the video doesn't alter it's current position.
|
||||
*/
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
* @brief Get play/pause state of the media file.
|
||||
*/
|
||||
}
|
||||
values {
|
||||
bool play; /*@ true if playing, false otherwise. */
|
||||
}
|
||||
}
|
||||
position {
|
||||
set {
|
||||
/*@
|
||||
* @brief Set the position in the media file.
|
||||
*
|
||||
* @param obj The emotion object whose position will be changed.
|
||||
* @param sec The position(in seconds) to which the media file will be set.
|
||||
*
|
||||
* This functions sets the current position of the media file to @p sec, this
|
||||
* only works on seekable streams. Setting the position doesn't change the
|
||||
* playing state of the media file.
|
||||
*/
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
* @brief Get the position in the media file.
|
||||
*
|
||||
* @param obj The emotion object from which the position will be retrieved.
|
||||
* @return The position of the media file.
|
||||
*
|
||||
* The position is returned as the number of seconds since the beginning of the
|
||||
* media file.
|
||||
*/
|
||||
}
|
||||
values {
|
||||
double second; /*@ The position (in seconds). */
|
||||
}
|
||||
}
|
||||
progress {
|
||||
get {
|
||||
/*@
|
||||
* @brief Get how much of the file has been played.
|
||||
*
|
||||
* This function gets the progress in playing the file, the return value is in
|
||||
* the [0, 1] range.
|
||||
*/
|
||||
}
|
||||
values {
|
||||
double progress; /*@ The progress within the [0, 1] range. */
|
||||
}
|
||||
}
|
||||
play_speed {
|
||||
/**
|
||||
* @brief Control the play speed of the media file.
|
||||
*
|
||||
* This function control the speed with which the media file will be played. 1.0
|
||||
* represents the normal speed, 2 double speed, 0.5 half speed and so on.
|
||||
*
|
||||
*/
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
double speed; /*@ The play speed in the [0, infinity) range. */
|
||||
}
|
||||
}
|
||||
audio_volume {
|
||||
/**
|
||||
* @brief Control the audio volume.
|
||||
*
|
||||
* Controls the audio volume of the stream being played. This has nothing to do with
|
||||
* the system volume. This volume will be multiplied by the system volume. e.g.:
|
||||
* if the current volume level is 0.5, and the system volume is 50%, it will be
|
||||
* 0.5 * 0.5 = 0.25.
|
||||
*/
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
double volume; /*@ The volume level */
|
||||
}
|
||||
}
|
||||
audio_mute {
|
||||
/**
|
||||
* @brief This property controls the audio mute state.
|
||||
*/
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
bool mute; /*@ The mute state. True or false. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
interface Efl.Text {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
text {
|
||||
set {
|
||||
/*@
|
||||
Sets the text string to be displayed by the given text object.
|
||||
|
||||
@see evas_object_text_text_get() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieves the text string currently being displayed by the given
|
||||
text object.
|
||||
|
||||
@return The text string currently being displayed on it.
|
||||
|
||||
@note Do not free() the return value.
|
||||
|
||||
@see evas_object_text_text_set() */
|
||||
}
|
||||
values {
|
||||
const(char)* text; /*@ Text string to display on it. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
type Efl_Font_Size: int;
|
||||
|
||||
interface Efl.Text_Properties {
|
||||
legacy_prefix: null;
|
||||
properties {
|
||||
font {
|
||||
set {
|
||||
/*@
|
||||
Set the font family or filename, and size on a given text object.
|
||||
|
||||
This function allows the font name and size of a text object to be
|
||||
set. The @p font string has to follow fontconfig's convention on
|
||||
naming fonts, as it's the underlying library used to query system
|
||||
fonts by Evas (see the @c fc-list command's output, on your system,
|
||||
to get an idea). Alternatively, one can use a full path to a font file.
|
||||
|
||||
@see evas_object_text_font_get()
|
||||
@see evas_object_text_font_source_set() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieve the font family and size in use on a given text object.
|
||||
|
||||
This function allows the font name and size of a text object to be
|
||||
queried. Be aware that the font name string is still owned by Evas
|
||||
and should @b not have free() called on it by the caller of the
|
||||
function.
|
||||
|
||||
@see evas_object_text_font_set() */
|
||||
}
|
||||
values {
|
||||
const(char) *font; /*@ The font family name or filename. */
|
||||
Efl_Font_Size size; /*@ The font size, in points. */
|
||||
}
|
||||
}
|
||||
font_source {
|
||||
set {
|
||||
/*@
|
||||
Set the font (source) file to be used on a given text object.
|
||||
|
||||
This function allows the font file to be explicitly set for a given
|
||||
text object, overriding system lookup, which will first occur in
|
||||
the given file's contents.
|
||||
|
||||
@see evas_object_text_font_get() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the font file's path which is being used on a given text
|
||||
object.
|
||||
|
||||
@return The font file's path.
|
||||
|
||||
@see evas_object_text_font_get() for more details */
|
||||
}
|
||||
values {
|
||||
const(char)* font_source; /*@ The font file's path. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -120,6 +120,13 @@
|
|||
# endif
|
||||
#endif /* ! _WIN32 */
|
||||
|
||||
#ifndef EFL_NOLEGACY_API_SUPPORT
|
||||
#include "Emotion_Legacy.h"
|
||||
#endif
|
||||
#ifdef EFL_EO_API_SUPPORT
|
||||
#include "Emotion_Eo.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file Emotion.h
|
||||
* @brief The file that provides Emotion the API, with functions available for
|
||||
|
@ -387,52 +394,6 @@ EAPI Eina_Bool emotion_shutdown(void);
|
|||
*/
|
||||
EAPI Evas_Object *emotion_object_add (Evas *evas);
|
||||
|
||||
/**
|
||||
* @brief Set the specified option for the current module.
|
||||
*
|
||||
* @param obj The emotion object which the option is being set to.
|
||||
* @param opt The option that is being set. Currently supported optiosn: "video"
|
||||
* and "audio".
|
||||
* @param val The value of the option. Currently only supports "off" (?!?!?!)
|
||||
*
|
||||
* This function allows one to mute the video or audio of the emotion object.
|
||||
*
|
||||
* @note Please don't use this function, consider using
|
||||
* emotion_object_audio_mute_set() and emotion_object_video_mute_set() instead.
|
||||
*
|
||||
* @see emotion_object_audio_mute_set()
|
||||
* @see emotion_object_video_mute_set()
|
||||
*
|
||||
* @ingroup Emotion_Init
|
||||
*/
|
||||
EAPI void emotion_object_module_option_set (Evas_Object *obj, const char *opt, const char *val);
|
||||
|
||||
/**
|
||||
* @brief Initializes an emotion object with the specified module.
|
||||
*
|
||||
* @param obj The emotion object to be initialized.
|
||||
* @param module_filename The name of the module to be used (gstreamer or xine).
|
||||
* @return @c EINA_TRUE if the specified module was successfully initialized for
|
||||
* this object, @c EINA_FALSE otherwise.
|
||||
*
|
||||
* This function is required after creating the emotion object, in order to
|
||||
* specify which module will be used with this object. Different objects can
|
||||
* use different modules to play a media file. The current supported modules are
|
||||
* @b gstreamer and @b xine.
|
||||
*
|
||||
* To use any of them, you need to make sure that support for them was compiled
|
||||
* correctly.
|
||||
*
|
||||
* @note It's possible to disable the build of a module with
|
||||
* --disable-module_name.
|
||||
*
|
||||
* @see emotion_object_add()
|
||||
* @see emotion_object_file_set()
|
||||
*
|
||||
* @ingroup Emotion_Init
|
||||
*/
|
||||
EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename);
|
||||
|
||||
/**
|
||||
* @brief Set borders for the emotion object.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
#include "emotion_object.eo.h"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
#include "emotion_object.eo.legacy.h"
|
|
@ -0,0 +1,122 @@
|
|||
class Emotion.Object (Evas.Object_Smart, Efl.File, Efl.Player, Efl.Image) {
|
||||
eo_prefix: emotion_obj;
|
||||
properties {
|
||||
option {
|
||||
set {
|
||||
/**
|
||||
* @brief Set the specified option for the current module.
|
||||
*
|
||||
* This function allows one to mute the video or audio of the emotion object.
|
||||
*
|
||||
* @note Please don't use this function, consider using
|
||||
* emotion_object_audio_mute_set() and emotion_object_video_mute_set() instead.
|
||||
*
|
||||
* @see emotion_object_audio_mute_set()
|
||||
* @see emotion_object_video_mute_set()
|
||||
*
|
||||
* @ingroup Emotion_Init
|
||||
*/
|
||||
legacy: emotion_object_module_option_set;
|
||||
}
|
||||
values {
|
||||
const(char) *opt; /*@ The option that is being set. Currently supported optiosn: "video" and "audio". */
|
||||
const(char) *val; /*@ The value of the option. Currently only supports "off" (?!?!?!) */
|
||||
}
|
||||
}
|
||||
engine {
|
||||
set {
|
||||
/**
|
||||
* @brief Initializes an emotion object with the specified module.
|
||||
*
|
||||
* This function is required after creating the emotion object, in order to
|
||||
* specify which module will be used with this object. Different objects can
|
||||
* use different modules to play a media file. The current supported modules are
|
||||
* @b gstreamer and @b xine.
|
||||
*
|
||||
* To use any of them, you need to make sure that support for them was compiled
|
||||
* correctly.
|
||||
*
|
||||
* @note It's possible to disable the build of a module with
|
||||
* --disable-module_name.
|
||||
*
|
||||
* @see emotion_object_add()
|
||||
* @see emotion_object_file_set()
|
||||
*
|
||||
* @ingroup Emotion_Init
|
||||
*/
|
||||
legacy: emotion_object_init;
|
||||
return: bool; /*@ @c EINA_TRUE if the specified module was successfully initialized for this object, @c EINA_FALSE otherwise. */
|
||||
}
|
||||
values {
|
||||
const(char) *module_filename; /*@ The name of the module to be used (gstreamer or xine). */
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Eo.Base.constructor;
|
||||
Evas.Object_Smart.add;
|
||||
Evas.Object_Smart.del;
|
||||
Evas.Object_Smart.move;
|
||||
Evas.Object_Smart.resize;
|
||||
Evas.Object_Smart.show;
|
||||
Evas.Object_Smart.hide;
|
||||
Evas.Object_Smart.color.set;
|
||||
Evas.Object_Smart.clip.set;
|
||||
Evas.Object_Smart.clip_unset;
|
||||
Efl.File.file.set;
|
||||
Efl.File.file.get;
|
||||
Efl.Player.play.set;
|
||||
Efl.Player.play.get;
|
||||
Efl.Player.position.set;
|
||||
Efl.Player.position.get;
|
||||
Efl.Player.progress.get;
|
||||
Efl.Player.audio_volume.set;
|
||||
Efl.Player.audio_volume.get;
|
||||
Efl.Player.audio_mute.set;
|
||||
Efl.Player.audio_mute.get;
|
||||
Efl.Image.load_size.get;
|
||||
Efl.Image.ratio.get;
|
||||
Efl.Image.smooth_scale.set;
|
||||
Efl.Image.smooth_scale.get;
|
||||
}
|
||||
events {
|
||||
frame_decode;
|
||||
position_update;
|
||||
length_change;
|
||||
frame_resize;
|
||||
decode_stop;
|
||||
playback_started;
|
||||
playback_finished;
|
||||
audio_level_change;
|
||||
channels_change;
|
||||
title_change;
|
||||
progress_change;
|
||||
ref_change;
|
||||
button_num_change;
|
||||
button_change;
|
||||
open_done;
|
||||
position_save,succeed;
|
||||
position_save,failed;
|
||||
position_load,succeed;
|
||||
position_load,failed;
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: Need to be added:
|
||||
EAPI double emotion_object_buffer_size_get (const Evas_Object *obj);
|
||||
EAPI Eina_Bool emotion_object_seekable_get (const Evas_Object *obj);
|
||||
EAPI double emotion_object_play_length_get (const Evas_Object *obj);
|
||||
EAPI const char *emotion_object_progress_info_get (const Evas_Object *obj);
|
||||
EAPI Eina_Bool emotion_object_video_handled_get (const Evas_Object *obj);
|
||||
EAPI Eina_Bool emotion_object_audio_handled_get (const Evas_Object *obj);
|
||||
|
||||
Everything starting from (needs to be added):
|
||||
EAPI int emotion_object_audio_channel_count (const Evas_Object *obj);
|
||||
|
||||
Should this be part of player or emotion object?
|
||||
EAPI void emotion_object_event_simple_send (Evas_Object *obj, Emotion_Event ev);
|
||||
|
||||
Deliberations:
|
||||
Should this really implement the image interface?
|
||||
*/
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <Eo.h>
|
||||
|
||||
#include <Efl.h>
|
||||
|
||||
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_IN;
|
||||
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT;
|
||||
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE;
|
||||
|
|
|
@ -1257,6 +1257,192 @@ EAPI Eina_Bool evas_object_image_source_unset(Evas_Object *o
|
|||
*/
|
||||
EAPI void evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the source file from where an image object must fetch the real
|
||||
* image data (it may be an Eet file, besides pure image ones).
|
||||
*
|
||||
* If the file supports multiple data stored in it (as Eet files do),
|
||||
* you can specify the key to be used as the index of the image in
|
||||
* this file.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* img = evas_object_image_add(canvas);
|
||||
* evas_object_image_file_set(img, "/path/to/img", NULL);
|
||||
* err = evas_object_image_load_error_get(img);
|
||||
* if (err != EVAS_LOAD_ERROR_NONE)
|
||||
* {
|
||||
* fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
|
||||
* valid_path, evas_load_error_str(err));
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* evas_object_image_fill_set(img, 0, 0, w, h);
|
||||
* evas_object_resize(img, w, h);
|
||||
* evas_object_show(img);
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
* @param[in] file The image file path.
|
||||
* @param[in] key The image key in @p file (if its an Eet one), or @c
|
||||
NULL, otherwise.
|
||||
*/
|
||||
EAPI void evas_object_image_file_set(Eo *obj, const char *file, const char *key);
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieve the source file from where an image object is to fetch the
|
||||
* real image data (it may be an Eet file, besides pure image ones).
|
||||
*
|
||||
* You must @b not modify the strings on the returned pointers.
|
||||
*
|
||||
* @note Use @c NULL pointers on the file components you're not
|
||||
* interested in: they'll be ignored by the function.
|
||||
*
|
||||
* @param[out] file The image file path.
|
||||
* @param[out] key The image key in @p file (if its an Eet one), or @c
|
||||
NULL, otherwise.
|
||||
*/
|
||||
EAPI void evas_object_image_file_get(const Eo *obj, const char **file, const char **key);
|
||||
|
||||
/**
|
||||
*
|
||||
* Save the given image object's contents to an (image) file.
|
||||
*
|
||||
* The extension suffix on @p file will determine which <b>saver
|
||||
* module</b> Evas is to use when saving, thus the final file's
|
||||
* format. If the file supports multiple data stored in it (Eet ones),
|
||||
* you can specify the key to be used as the index of the image in it.
|
||||
*
|
||||
* You can specify some flags when saving the image. Currently
|
||||
* acceptable flags are @c quality and @c compress. Eg.: @c
|
||||
* "quality=100 compress=9"
|
||||
*
|
||||
* @param[in] file The filename to be used to save the image (extension
|
||||
obligatory).
|
||||
* @param[in] key The image key in the file (if an Eet one), or @c NULL,
|
||||
otherwise.
|
||||
* @param[in] flags String containing the flags to be used (@c NULL for
|
||||
none).
|
||||
*/
|
||||
EAPI Eina_Bool evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(2);
|
||||
|
||||
/**
|
||||
*
|
||||
* Check if an image object can be animated (have multiple frames)
|
||||
*
|
||||
* @return whether obj support animation
|
||||
*
|
||||
* This returns if the image file of an image object is capable of animation
|
||||
* such as an animated gif file might. This is only useful to be called once
|
||||
* the image object file has been set.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* extern Evas_Object *obj;
|
||||
*
|
||||
* if (evas_object_image_animated_get(obj))
|
||||
* {
|
||||
* int frame_count;
|
||||
* int loop_count;
|
||||
* Evas_Image_Animated_Loop_Hint loop_type;
|
||||
* double duration;
|
||||
*
|
||||
* frame_count = evas_object_image_animated_frame_count_get(obj);
|
||||
* printf("This image has %d frames\n",frame_count);
|
||||
*
|
||||
* duration = evas_object_image_animated_frame_duration_get(obj,1,0);
|
||||
* printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n");
|
||||
*
|
||||
* loop_count = evas_object_image_animated_loop_count_get(obj);
|
||||
* printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count);
|
||||
*
|
||||
* loop_type = evas_object_image_animated_loop_type_get(obj);
|
||||
* if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP)
|
||||
* printf("You had better set frame like 1->2->3->1->2->3...\n");
|
||||
* else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG)
|
||||
* printf("You had better set frame like 1->2->3->2->1->2...\n");
|
||||
* else
|
||||
* printf("Unknown loop type\n");
|
||||
*
|
||||
* evas_object_image_animated_frame_set(obj,1);
|
||||
* printf("You set image object's frame to 1. You can see frame 1\n");
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
* @see evas_object_image_animated_get()
|
||||
* @see evas_object_image_animated_frame_count_get()
|
||||
* @see evas_object_image_animated_loop_type_get()
|
||||
* @see evas_object_image_animated_loop_count_get()
|
||||
* @see evas_object_image_animated_frame_duration_get()
|
||||
* @see evas_object_image_animated_frame_set()
|
||||
* @since 1.1
|
||||
*
|
||||
*/
|
||||
EAPI Eina_Bool evas_object_image_animated_get(const Eo *obj);
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the size of a given image object's source image, when loading
|
||||
* it.
|
||||
*
|
||||
* This function sets a new (loading) size for the given canvas
|
||||
* image.
|
||||
*
|
||||
* @see evas_object_image_load_size_get()
|
||||
*
|
||||
* @param[in] w The new width of the image's load size.
|
||||
* @param[in] h The new height of the image's load size.
|
||||
*/
|
||||
EAPI void evas_object_image_load_size_set(Eo *obj, int w, int h);
|
||||
|
||||
/**
|
||||
*
|
||||
* Get the size of a given image object's source image, when loading
|
||||
* it.
|
||||
*
|
||||
* @note Use @c NULL pointers on the size components you're not
|
||||
* interested in: they'll be ignored by the function.
|
||||
*
|
||||
* @see evas_object_image_load_size_set() for more details
|
||||
*
|
||||
* @param[out] w The new width of the image's load size.
|
||||
* @param[out] h The new height of the image's load size.
|
||||
*/
|
||||
EAPI void evas_object_image_load_size_get(const Eo *obj, int *w, int *h);
|
||||
|
||||
/**
|
||||
*
|
||||
* Sets whether to use high-quality image scaling algorithm on the
|
||||
* given image object.
|
||||
*
|
||||
* When enabled, a higher quality image scaling algorithm is used when
|
||||
* scaling images to sizes other than the source image's original
|
||||
* one. This gives better results but is more computationally
|
||||
* expensive.
|
||||
*
|
||||
* @note Image objects get created originally with smooth scaling @b
|
||||
* on.
|
||||
*
|
||||
* @see evas_object_image_smooth_scale_get()
|
||||
*
|
||||
* @param[in] smooth_scale Whether to use smooth scale or not.
|
||||
*/
|
||||
EAPI void evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale);
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieves whether the given image object is using high-quality
|
||||
* image scaling algorithm.
|
||||
*
|
||||
* @return Whether smooth scale is being used.
|
||||
*
|
||||
* See @ref evas_object_image_smooth_scale_set() for more details.
|
||||
*
|
||||
*/
|
||||
EAPI Eina_Bool evas_object_image_smooth_scale_get(const Eo *obj);
|
||||
|
||||
#include "canvas/evas_image.eo.legacy.h"
|
||||
|
||||
/**
|
||||
|
@ -1285,8 +1471,93 @@ EAPI void evas_object_image_alpha_mask_set(Evas_Object
|
|||
*/
|
||||
EAPI Evas_Object *evas_object_text_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
|
||||
|
||||
/**
|
||||
*
|
||||
* Sets the text string to be displayed by the given text object.
|
||||
*
|
||||
* @see evas_object_text_text_get()
|
||||
*
|
||||
* @param[in] text Text string to display on it.
|
||||
*/
|
||||
EAPI void evas_object_text_text_set(Eo *obj, const char *text);
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieves the text string currently being displayed by the given
|
||||
* text object.
|
||||
*
|
||||
* @return The text string currently being displayed on it.
|
||||
*
|
||||
* @note Do not free() the return value.
|
||||
*
|
||||
* @see evas_object_text_text_set()
|
||||
*
|
||||
*/
|
||||
EAPI const char *evas_object_text_text_get(const Eo *obj);
|
||||
|
||||
#include "canvas/evas_text.eo.legacy.h"
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the font (source) file to be used on a given text object.
|
||||
*
|
||||
* This function allows the font file to be explicitly set for a given
|
||||
* text object, overriding system lookup, which will first occur in
|
||||
* the given file's contents.
|
||||
*
|
||||
* @see evas_object_text_font_get()
|
||||
*
|
||||
* @param[in] font_source The font file's path.
|
||||
*/
|
||||
EAPI void evas_object_text_font_source_set(Eo *obj, const char *font_source);
|
||||
|
||||
/**
|
||||
*
|
||||
* Get the font file's path which is being used on a given text
|
||||
* object.
|
||||
*
|
||||
* @return The font file's path.
|
||||
*
|
||||
* @see evas_object_text_font_get() for more details
|
||||
*
|
||||
*/
|
||||
EAPI const char *evas_object_text_font_source_get(const Eo *obj);
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the font family or filename, and size on a given text object.
|
||||
*
|
||||
* This function allows the font name and size of a text object to be
|
||||
* set. The @p font string has to follow fontconfig's convention on
|
||||
* naming fonts, as it's the underlying library used to query system
|
||||
* fonts by Evas (see the @c fc-list command's output, on your system,
|
||||
* to get an idea). Alternatively, one can use a full path to a font file.
|
||||
*
|
||||
* @see evas_object_text_font_get()
|
||||
* @see evas_object_text_font_source_set()
|
||||
*
|
||||
* @param[in] font The font family name or filename.
|
||||
* @param[in] size The font size, in points.
|
||||
*/
|
||||
EAPI void evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size);
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieve the font family and size in use on a given text object.
|
||||
*
|
||||
* This function allows the font name and size of a text object to be
|
||||
* queried. Be aware that the font name string is still owned by Evas
|
||||
* and should @b not have free() called on it by the caller of the
|
||||
* function.
|
||||
*
|
||||
* @see evas_object_text_font_set()
|
||||
*
|
||||
* @param[out] font The font family name or filename.
|
||||
* @param[out] size The font size, in points.
|
||||
*/
|
||||
EAPI void evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1367,6 +1638,92 @@ EAPI Evas_Object *evas_object_textgrid_add(Evas *e);
|
|||
|
||||
#include "canvas/evas_textgrid.eo.legacy.h"
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Set the font (source) file to be used on a given textgrid object.
|
||||
*
|
||||
* This function allows the font file @p font_source to be explicitly
|
||||
* set for the textgrid object @p obj, overriding system lookup, which
|
||||
* will first occur in the given file's contents. If @p font_source is
|
||||
* @c NULL or is an empty string, or the same font_source has already
|
||||
* been set, or on error, this function does nothing.
|
||||
*
|
||||
* @see evas_object_textgrid_font_get()
|
||||
* @see evas_object_textgrid_font_set()
|
||||
* @see evas_object_textgrid_font_source_get()
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @param[in] font_source The font file's path.
|
||||
*/
|
||||
EAPI void evas_object_textgrid_font_source_set(Eo *obj, const char *font_source);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Get the font file's path which is being used on a given textgrid object.
|
||||
*
|
||||
* @return The font file's path.
|
||||
*
|
||||
* This function returns the font source path of the textgrid object
|
||||
* @p obj. If the font source path has not been set, or on error,
|
||||
* @c NULL is returned.
|
||||
*
|
||||
* @see evas_object_textgrid_font_get()
|
||||
* @see evas_object_textgrid_font_set()
|
||||
* @see evas_object_textgrid_font_source_set()
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
*/
|
||||
EAPI const char *evas_object_textgrid_font_source_get(const Eo *obj);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Set the font family and size on a given textgrid object.
|
||||
*
|
||||
* This function allows the font name @p font_name and size
|
||||
* @p font_size of the textgrid object @p obj to be set. The @p font_name
|
||||
* string has to follow fontconfig's convention on naming fonts, as
|
||||
* it's the underlying library used to query system fonts by Evas (see
|
||||
* the @c fc-list command's output, on your system, to get an
|
||||
* idea). It also has to be a monospace font. If @p font_name is
|
||||
* @c NULL, or if it is an empty string, or if @p font_size is less or
|
||||
* equal than 0, or on error, this function does nothing.
|
||||
*
|
||||
* @see evas_object_textgrid_font_get()
|
||||
* @see evas_object_textgrid_font_source_set()
|
||||
* @see evas_object_textgrid_font_source_get()
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @param[in] font_name The font (family) name.
|
||||
* @param[in] font_size The font size, in points.
|
||||
*/
|
||||
EAPI void evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size);
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Retrieve the font family and size in use on a given textgrid object.
|
||||
*
|
||||
* This function allows the font name and size of a textgrid object
|
||||
* @p obj to be queried and stored respectively in the buffers
|
||||
* @p font_name and @p font_size. Be aware that the font name string is
|
||||
* still owned by Evas and should @b not have free() called on it by
|
||||
* the caller of the function. On error, the font name is the empty
|
||||
* string and the font size is 0. @p font_name and @p font_source can
|
||||
* be @c NULL.
|
||||
*
|
||||
* @see evas_object_textgrid_font_set()
|
||||
* @see evas_object_textgrid_font_source_set()
|
||||
* @see evas_object_textgrid_font_source_get()
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @param[out] font_name The font (family) name.
|
||||
* @param[out] font_size The font size, in points.
|
||||
*/
|
||||
EAPI void evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Evas.Image (Evas.Object)
|
||||
class Evas.Image (Evas.Object, Efl.File, Efl.Image)
|
||||
{
|
||||
legacy_prefix: evas_object_image;
|
||||
eo_prefix: evas_obj_image;
|
||||
|
@ -214,32 +214,6 @@ class Evas.Image (Evas.Object)
|
|||
or not (@c EINA_FALSE). */
|
||||
}
|
||||
}
|
||||
load_size {
|
||||
set {
|
||||
/*@
|
||||
Set the size of a given image object's source image, when loading
|
||||
it.
|
||||
|
||||
This function sets a new (loading) size for the given canvas
|
||||
image.
|
||||
|
||||
@see evas_object_image_load_size_get() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the size of a given image object's source image, when loading
|
||||
it.
|
||||
|
||||
@note Use @c NULL pointers on the size components you're not
|
||||
interested in: they'll be ignored by the function.
|
||||
|
||||
@see evas_object_image_load_size_set() for more details */
|
||||
}
|
||||
values {
|
||||
int w; /*@ The new width of the image's load size. */
|
||||
int h; /*@ The new height of the image's load size. */
|
||||
}
|
||||
}
|
||||
border {
|
||||
set {
|
||||
/*@
|
||||
|
@ -295,35 +269,6 @@ class Evas.Image (Evas.Object)
|
|||
int b; /*@ The border's bottom width. */
|
||||
}
|
||||
}
|
||||
smooth_scale {
|
||||
set {
|
||||
/*@
|
||||
Sets whether to use high-quality image scaling algorithm on the
|
||||
given image object.
|
||||
|
||||
When enabled, a higher quality image scaling algorithm is used when
|
||||
scaling images to sizes other than the source image's original
|
||||
one. This gives better results but is more computationally
|
||||
expensive.
|
||||
|
||||
@note Image objects get created originally with smooth scaling @b
|
||||
on.
|
||||
|
||||
@see evas_object_image_smooth_scale_get() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieves whether the given image object is using high-quality
|
||||
image scaling algorithm.
|
||||
|
||||
@return Whether smooth scale is being used.
|
||||
|
||||
See @ref evas_object_image_smooth_scale_set() for more details. */
|
||||
}
|
||||
values {
|
||||
bool smooth_scale; /*@ Whether to use smooth scale or not. */
|
||||
}
|
||||
}
|
||||
border_scale {
|
||||
set {
|
||||
/*@
|
||||
|
@ -435,50 +380,6 @@ class Evas.Image (Evas.Object)
|
|||
Evas_Fill_Spread spread; /*@ One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT, */
|
||||
}
|
||||
}
|
||||
file {
|
||||
set {
|
||||
/*@
|
||||
Set the source file from where an image object must fetch the real
|
||||
image data (it may be an Eet file, besides pure image ones).
|
||||
|
||||
If the file supports multiple data stored in it (as Eet files do),
|
||||
you can specify the key to be used as the index of the image in
|
||||
this file.
|
||||
|
||||
Example:
|
||||
@code
|
||||
img = evas_object_image_add(canvas);
|
||||
evas_object_image_file_set(img, "/path/to/img", NULL);
|
||||
err = evas_object_image_load_error_get(img);
|
||||
if (err != EVAS_LOAD_ERROR_NONE)
|
||||
{
|
||||
fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
|
||||
valid_path, evas_load_error_str(err));
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_image_fill_set(img, 0, 0, w, h);
|
||||
evas_object_resize(img, w, h);
|
||||
evas_object_show(img);
|
||||
}
|
||||
@endcode */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieve the source file from where an image object is to fetch the
|
||||
real image data (it may be an Eet file, besides pure image ones).
|
||||
|
||||
You must @b not modify the strings on the returned pointers.
|
||||
|
||||
@note Use @c NULL pointers on the file components you're not
|
||||
interested in: they'll be ignored by the function. */
|
||||
}
|
||||
values {
|
||||
const(char)* file; /*@ The image file path. */
|
||||
const(char)* key; /*@ The image key in @p file (if its an Eet one), or @c
|
||||
NULL, otherwise. */
|
||||
}
|
||||
}
|
||||
border_center_fill {
|
||||
set {
|
||||
/*@
|
||||
|
@ -893,60 +794,6 @@ class Evas.Image (Evas.Object)
|
|||
return: int @warn_unused;
|
||||
}
|
||||
}
|
||||
animated {
|
||||
get {
|
||||
/*@
|
||||
Check if an image object can be animated (have multiple frames)
|
||||
|
||||
@return whether obj support animation
|
||||
|
||||
This returns if the image file of an image object is capable of animation
|
||||
such as an animated gif file might. This is only useful to be called once
|
||||
the image object file has been set.
|
||||
|
||||
Example:
|
||||
@code
|
||||
extern Evas_Object *obj;
|
||||
|
||||
if (evas_object_image_animated_get(obj))
|
||||
{
|
||||
int frame_count;
|
||||
int loop_count;
|
||||
Evas_Image_Animated_Loop_Hint loop_type;
|
||||
double duration;
|
||||
|
||||
frame_count = evas_object_image_animated_frame_count_get(obj);
|
||||
printf("This image has %d frames\n",frame_count);
|
||||
|
||||
duration = evas_object_image_animated_frame_duration_get(obj,1,0);
|
||||
printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n");
|
||||
|
||||
loop_count = evas_object_image_animated_loop_count_get(obj);
|
||||
printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count);
|
||||
|
||||
loop_type = evas_object_image_animated_loop_type_get(obj);
|
||||
if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP)
|
||||
printf("You had better set frame like 1->2->3->1->2->3...\n");
|
||||
else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG)
|
||||
printf("You had better set frame like 1->2->3->2->1->2...\n");
|
||||
else
|
||||
printf("Unknown loop type\n");
|
||||
|
||||
evas_object_image_animated_frame_set(obj,1);
|
||||
printf("You set image object's frame to 1. You can see frame 1\n");
|
||||
}
|
||||
@endcode
|
||||
|
||||
@see evas_object_image_animated_get()
|
||||
@see evas_object_image_animated_frame_count_get()
|
||||
@see evas_object_image_animated_loop_type_get()
|
||||
@see evas_object_image_animated_loop_count_get()
|
||||
@see evas_object_image_animated_frame_duration_get()
|
||||
@see evas_object_image_animated_frame_set()
|
||||
@since 1.1 */
|
||||
return: bool;
|
||||
}
|
||||
}
|
||||
animated_loop_type {
|
||||
get {
|
||||
/*@
|
||||
|
@ -1124,28 +971,6 @@ class Evas.Image (Evas.Object)
|
|||
@in int frame_num; /*@ Number of frames in the sequence */
|
||||
}
|
||||
}
|
||||
save @const {
|
||||
/*@
|
||||
Save the given image object's contents to an (image) file.
|
||||
|
||||
The extension suffix on @p file will determine which <b>saver
|
||||
module</b> Evas is to use when saving, thus the final file's
|
||||
format. If the file supports multiple data stored in it (Eet ones),
|
||||
you can specify the key to be used as the index of the image in it.
|
||||
|
||||
You can specify some flags when saving the image. Currently
|
||||
acceptable flags are @c quality and @c compress. Eg.: @c
|
||||
"quality=100 compress=9" */
|
||||
return: bool;
|
||||
params {
|
||||
@in const(char)* file @nonull; /*@ The filename to be used to save the image (extension
|
||||
obligatory). */
|
||||
@in const(char)* key; /*@ The image key in the file (if an Eet one), or @c NULL,
|
||||
otherwise. */
|
||||
@in const(char)* flags; /*@ String containing the flags to be used (@c NULL for
|
||||
none). */
|
||||
}
|
||||
}
|
||||
data_set {
|
||||
/*@
|
||||
Sets the raw image data of the given image object.
|
||||
|
@ -1241,5 +1066,13 @@ class Evas.Image (Evas.Object)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Eo.Base.dbg_info_get;
|
||||
Efl.File.file.set;
|
||||
Efl.File.file.get;
|
||||
Efl.File.save;
|
||||
Efl.Image.animated.get;
|
||||
Efl.Image.load_size.set;
|
||||
Efl.Image.load_size.get;
|
||||
Efl.Image.smooth_scale.set;
|
||||
Efl.Image.smooth_scale.get;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -568,8 +568,8 @@ _evas_image_mmap_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, const Eina_File
|
|||
*key = o->cur->key;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_file_set(Eo *eo_obj, Evas_Image_Data *o, const char *file, const char *key)
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_file_file_set(Eo *eo_obj, Evas_Image_Data *o, const char *file, const char *key)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
Evas_Image_Load_Opts lo;
|
||||
|
@ -577,9 +577,9 @@ _evas_image_file_set(Eo *eo_obj, Evas_Image_Data *o, const char *file, const cha
|
|||
if ((o->cur->u.file) && (file) && (!strcmp(o->cur->u.file, file)))
|
||||
{
|
||||
if ((!o->cur->key) && (!key))
|
||||
return;
|
||||
return EINA_FALSE;
|
||||
if ((o->cur->key) && (key) && (!strcmp(o->cur->key, key)))
|
||||
return;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
/*
|
||||
* WTF? why cancel a null image preload? this is just silly (tm)
|
||||
|
@ -595,10 +595,12 @@ _evas_image_file_set(Eo *eo_obj, Evas_Image_Data *o, const char *file, const cha
|
|||
&o->load_error,
|
||||
&lo);
|
||||
_image_done_set(eo_obj, obj, o);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_file_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, const char **file, const char **key)
|
||||
_evas_image_efl_file_file_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, const char **file, const char **key)
|
||||
{
|
||||
if (file) *file = o->cur->u.file;
|
||||
if (key) *key = o->cur->key;
|
||||
|
@ -1453,7 +1455,7 @@ _evas_image_alpha_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_scale)
|
||||
_evas_image_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_scale)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj;
|
||||
|
||||
|
@ -1470,7 +1472,7 @@ _evas_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_sc
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_smooth_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_evas_image_efl_image_smooth_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->cur->smooth_scale;
|
||||
}
|
||||
|
@ -1508,7 +1510,7 @@ _evas_image_reload(Eo *eo_obj, Evas_Image_Data *o)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_save(Eo *eo_obj, Evas_Image_Data *o, const char *file, const char *key, const char *flags)
|
||||
_evas_image_efl_file_save(Eo *eo_obj, Evas_Image_Data *o, const char *file, const char *key, const char *flags)
|
||||
{
|
||||
DATA32 *data = NULL;
|
||||
int quality = 80, compress = 9, ok = 0;
|
||||
|
@ -1692,7 +1694,7 @@ _evas_image_load_dpi_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
|
||||
_evas_image_efl_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
|
||||
{
|
||||
if ((o->load_opts->w == w) && (o->load_opts->h == h)) return;
|
||||
|
||||
|
@ -1716,7 +1718,7 @@ _evas_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_load_size_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *w, int *h)
|
||||
_evas_image_efl_image_load_size_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *w, int *h)
|
||||
{
|
||||
if (w) *w = o->load_opts->w;
|
||||
if (h) *h = o->load_opts->h;
|
||||
|
@ -2053,7 +2055,7 @@ _evas_image_region_support_get(Eo *eo_obj, Evas_Image_Data *o)
|
|||
|
||||
/* animated feature */
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_animated_get(Eo *eo_obj, Evas_Image_Data *o)
|
||||
_evas_image_efl_image_animated_get(Eo *eo_obj, Evas_Image_Data *o)
|
||||
{
|
||||
Eina_Bool animated;
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
@ -4958,4 +4960,53 @@ _evas_image_filter_padding_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o,
|
|||
|
||||
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
|
||||
|
||||
EAPI void
|
||||
evas_object_image_file_set(Eo *obj, const char *file, const char *key)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_file_set(file, key));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_image_file_get(const Eo *obj, const char **file, const char **key)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_file_get(file, key));
|
||||
}
|
||||
|
||||
|
||||
EAPI Eina_Bool
|
||||
evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags)
|
||||
{
|
||||
return eo_do((Eo *) obj, efl_file_save(file, key, flags));
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
evas_object_image_animated_get(const Eo *obj)
|
||||
{
|
||||
return eo_do((Eo *) obj, efl_image_animated_get());
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_image_load_size_set(Eo *obj, int w, int h)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_image_load_size_set(w, h));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_image_load_size_get(const Eo *obj, int *w, int *h)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_image_load_size_get(w, h));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_image_smooth_scale_set(smooth_scale));
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
evas_object_image_smooth_scale_get(const Eo *obj)
|
||||
{
|
||||
return eo_do((Eo *) obj, efl_image_smooth_scale_get());
|
||||
}
|
||||
|
||||
#include "canvas/evas_image.eo.c"
|
||||
|
|
|
@ -388,7 +388,7 @@ _evas_text_eo_base_constructor(Eo *eo_obj, Evas_Text_Data *class_data EINA_UNUSE
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_text_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source)
|
||||
_evas_text_efl_text_properties_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source)
|
||||
{
|
||||
if ((o->cur.source) && (font_source) &&
|
||||
(!strcmp(o->cur.source, font_source)))
|
||||
|
@ -402,14 +402,14 @@ _evas_text_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char
|
|||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
_evas_text_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
||||
_evas_text_efl_text_properties_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
||||
{
|
||||
|
||||
return o->cur.source;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_text_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size)
|
||||
_evas_text_efl_text_properties_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size)
|
||||
{
|
||||
Eina_Bool is, was = EINA_FALSE;
|
||||
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
|
||||
|
@ -497,7 +497,7 @@ _evas_text_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_S
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_text_font_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char **font, Evas_Font_Size *size)
|
||||
_evas_text_efl_text_properties_font_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char **font, Evas_Font_Size *size)
|
||||
{
|
||||
if (font) *font = o->cur.font;
|
||||
if (size) *size = o->cur.size;
|
||||
|
@ -955,19 +955,19 @@ _evas_text_eo_base_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Eo_Db
|
|||
|
||||
const char *text;
|
||||
int size;
|
||||
eo_do(eo_obj, evas_obj_text_font_get(&text, &size));
|
||||
eo_do(eo_obj, efl_text_properties_font_get(&text, &size));
|
||||
EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
|
||||
EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
|
||||
|
||||
eo_do(eo_obj, text = evas_obj_text_font_source_get());
|
||||
eo_do(eo_obj, text = efl_text_properties_font_source_get());
|
||||
EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text);
|
||||
|
||||
eo_do(eo_obj, text = evas_obj_text_get());
|
||||
eo_do(eo_obj, text = efl_text_get());
|
||||
EO_DBG_INFO_APPEND(group, "Text", EINA_VALUE_TYPE_STRING, text);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text)
|
||||
_evas_text_efl_text_text_set(Eo *eo_obj, Evas_Text_Data *o, const char *_text)
|
||||
{
|
||||
int is, was, len;
|
||||
Eina_Unicode *text;
|
||||
|
@ -1022,7 +1022,7 @@ _evas_text_bidi_delimiters_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
|||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
_evas_text_text_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
||||
_evas_text_efl_text_text_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
||||
{
|
||||
return o->cur.utf8_text;
|
||||
}
|
||||
|
@ -2475,4 +2475,42 @@ update:
|
|||
|
||||
/* EXPERIMENTAL CODE END */
|
||||
|
||||
EAPI void
|
||||
evas_object_text_font_source_set(Eo *obj, const char *font_source)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_properties_font_source_set(font_source));
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
evas_object_text_font_source_get(const Eo *obj)
|
||||
{
|
||||
const char *font_source = 0;
|
||||
eo_do((Eo *) obj, font_source = efl_text_properties_font_source_get());
|
||||
return font_source;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_properties_font_set(font, size));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_properties_font_get(font, size));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_text_text_set(Eo *obj, const char *text)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_set(text));
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
evas_object_text_text_get(const Eo *obj)
|
||||
{
|
||||
return eo_do((Eo *) obj, efl_text_get());
|
||||
}
|
||||
|
||||
#include "canvas/evas_text.eo.c"
|
||||
|
|
|
@ -1124,7 +1124,7 @@ _evas_textgrid_size_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, int *w, i
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_textgrid_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_source)
|
||||
_evas_textgrid_efl_text_properties_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_source)
|
||||
{
|
||||
|
||||
if ((!font_source) || (!*font_source))
|
||||
|
@ -1141,13 +1141,13 @@ _evas_textgrid_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *fo
|
|||
}
|
||||
|
||||
EOLIAN static const char*
|
||||
_evas_textgrid_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o)
|
||||
_evas_textgrid_efl_text_properties_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o)
|
||||
{
|
||||
return o->cur.font_source;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_textgrid_font_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_name, Evas_Font_Size font_size)
|
||||
_evas_textgrid_efl_text_properties_font_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_name, Evas_Font_Size font_size)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
Eina_Bool is, was = EINA_FALSE;
|
||||
|
@ -1283,7 +1283,7 @@ _evas_textgrid_font_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_name
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_textgrid_font_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, const char **font_name, Evas_Font_Size *font_size)
|
||||
_evas_textgrid_efl_text_properties_font_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o, const char **font_name, Evas_Font_Size *font_size)
|
||||
{
|
||||
if (font_name) *font_name = o->cur.font_name;
|
||||
if (font_size) *font_size = o->cur.font_size;
|
||||
|
@ -1491,11 +1491,11 @@ _evas_textgrid_eo_base_dbg_info_get(Eo *eo_obj, Evas_Textgrid_Data *o EINA_UNUSE
|
|||
|
||||
const char *text;
|
||||
int size;
|
||||
eo_do(eo_obj, evas_obj_textgrid_font_get(&text, &size));
|
||||
eo_do(eo_obj, efl_text_properties_font_get(&text, &size));
|
||||
EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
|
||||
EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
|
||||
|
||||
eo_do(eo_obj, text = evas_obj_textgrid_font_source_get());
|
||||
eo_do(eo_obj, text = efl_text_properties_font_source_get());
|
||||
EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text);
|
||||
|
||||
{
|
||||
|
@ -1507,4 +1507,30 @@ _evas_textgrid_eo_base_dbg_info_get(Eo *eo_obj, Evas_Textgrid_Data *o EINA_UNUSE
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_textgrid_font_source_set(Eo *obj, const char *font_source)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_properties_font_source_set(font_source));
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
evas_object_textgrid_font_source_get(const Eo *obj)
|
||||
{
|
||||
const char *font_source = NULL;
|
||||
eo_do((Eo *) obj, font_source = efl_text_properties_font_source_get());
|
||||
return font_source;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_properties_font_set(font_name, font_size));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size)
|
||||
{
|
||||
eo_do((Eo *) obj, efl_text_properties_font_get(font_name, font_size));
|
||||
}
|
||||
|
||||
#include "canvas/evas_textgrid.eo.c"
|
||||
|
|
|
@ -1,32 +1,8 @@
|
|||
class Evas.Text (Evas.Object)
|
||||
class Evas.Text (Evas.Object, Efl.Text, Efl.Text_Properties)
|
||||
{
|
||||
legacy_prefix: evas_object_text;
|
||||
eo_prefix: evas_obj_text;
|
||||
properties {
|
||||
font_source {
|
||||
set {
|
||||
/*@
|
||||
Set the font (source) file to be used on a given text object.
|
||||
|
||||
This function allows the font file to be explicitly set for a given
|
||||
text object, overriding system lookup, which will first occur in
|
||||
the given file's contents.
|
||||
|
||||
@see evas_object_text_font_get() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Get the font file's path which is being used on a given text
|
||||
object.
|
||||
|
||||
@return The font file's path.
|
||||
|
||||
@see evas_object_text_font_get() for more details */
|
||||
}
|
||||
values {
|
||||
const(char)* font_source; /*@ The font file's path. */
|
||||
}
|
||||
}
|
||||
shadow_color {
|
||||
set {
|
||||
/*@
|
||||
|
@ -146,28 +122,6 @@ class Evas.Text (Evas.Object)
|
|||
int a; /*@ The alpha component of the given color. */
|
||||
}
|
||||
}
|
||||
text {
|
||||
set {
|
||||
/*@
|
||||
Sets the text string to be displayed by the given text object.
|
||||
|
||||
@see evas_object_text_text_get() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieves the text string currently being displayed by the given
|
||||
text object.
|
||||
|
||||
@return The text string currently being displayed on it.
|
||||
|
||||
@note Do not free() the return value.
|
||||
|
||||
@see evas_object_text_text_set() */
|
||||
}
|
||||
values {
|
||||
const(char)* text; /*@ Text string to display on it. */
|
||||
}
|
||||
}
|
||||
glow2_color {
|
||||
set {
|
||||
/*@
|
||||
|
@ -196,36 +150,6 @@ class Evas.Text (Evas.Object)
|
|||
int a; /*@ The alpha component of the given color. */
|
||||
}
|
||||
}
|
||||
font {
|
||||
set {
|
||||
/*@
|
||||
Set the font family or filename, and size on a given text object.
|
||||
|
||||
This function allows the font name and size of a text object to be
|
||||
set. The @p font string has to follow fontconfig's convention on
|
||||
naming fonts, as it's the underlying library used to query system
|
||||
fonts by Evas (see the @c fc-list command's output, on your system,
|
||||
to get an idea). Alternatively, one can use a full path to a font file.
|
||||
|
||||
@see evas_object_text_font_get()
|
||||
@see evas_object_text_font_source_set() */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
Retrieve the font family and size in use on a given text object.
|
||||
|
||||
This function allows the font name and size of a text object to be
|
||||
queried. Be aware that the font name string is still owned by Evas
|
||||
and should @b not have free() called on it by the caller of the
|
||||
function.
|
||||
|
||||
@see evas_object_text_font_set() */
|
||||
}
|
||||
values {
|
||||
const(char)* font; /*@ The font family name or filename. */
|
||||
Evas_Font_Size size; /*@ The font size, in points. */
|
||||
}
|
||||
}
|
||||
style {
|
||||
set {
|
||||
/*@
|
||||
|
@ -439,5 +363,11 @@ class Evas.Text (Evas.Object)
|
|||
Eo.Base.destructor;
|
||||
Eo.Base.dbg_info_get;
|
||||
Evas.Object.size.set;
|
||||
Efl.Text.text.set;
|
||||
Efl.Text.text.get;
|
||||
Efl.Text_Properties.font.get;
|
||||
Efl.Text_Properties.font.set;
|
||||
Efl.Text_Properties.font_source.get;
|
||||
Efl.Text_Properties.font_source.set;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +1,8 @@
|
|||
class Evas.Textgrid (Evas.Object)
|
||||
class Evas.Textgrid (Evas.Object, Efl.Text_Properties)
|
||||
{
|
||||
legacy_prefix: evas_object_textgrid;
|
||||
eo_prefix: evas_obj_textgrid;
|
||||
properties {
|
||||
font_source {
|
||||
set {
|
||||
/*@
|
||||
@brief Set the font (source) file to be used on a given textgrid object.
|
||||
|
||||
This function allows the font file @p font_source to be explicitly
|
||||
set for the textgrid object @p obj, overriding system lookup, which
|
||||
will first occur in the given file's contents. If @p font_source is
|
||||
@c NULL or is an empty string, or the same font_source has already
|
||||
been set, or on error, this function does nothing.
|
||||
|
||||
@see evas_object_textgrid_font_get()
|
||||
@see evas_object_textgrid_font_set()
|
||||
@see evas_object_textgrid_font_source_get()
|
||||
|
||||
@since 1.7 */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
@brief Get the font file's path which is being used on a given textgrid object.
|
||||
|
||||
@return The font file's path.
|
||||
|
||||
This function returns the font source path of the textgrid object
|
||||
@p obj. If the font source path has not been set, or on error,
|
||||
@c NULL is returned.
|
||||
|
||||
@see evas_object_textgrid_font_get()
|
||||
@see evas_object_textgrid_font_set()
|
||||
@see evas_object_textgrid_font_source_set()
|
||||
|
||||
@since 1.7 */
|
||||
}
|
||||
values {
|
||||
const(char)* font_source; /*@ The font file's path. */
|
||||
}
|
||||
}
|
||||
supported_font_styles {
|
||||
set {
|
||||
/*@ No description supplied by the EAPI. */
|
||||
|
@ -51,49 +14,6 @@ class Evas.Textgrid (Evas.Object)
|
|||
Evas_Textgrid_Font_Style styles;
|
||||
}
|
||||
}
|
||||
font {
|
||||
set {
|
||||
/*@
|
||||
@brief Set the font family and size on a given textgrid object.
|
||||
|
||||
This function allows the font name @p font_name and size
|
||||
@p font_size of the textgrid object @p obj to be set. The @p font_name
|
||||
string has to follow fontconfig's convention on naming fonts, as
|
||||
it's the underlying library used to query system fonts by Evas (see
|
||||
the @c fc-list command's output, on your system, to get an
|
||||
idea). It also has to be a monospace font. If @p font_name is
|
||||
@c NULL, or if it is an empty string, or if @p font_size is less or
|
||||
equal than 0, or on error, this function does nothing.
|
||||
|
||||
@see evas_object_textgrid_font_get()
|
||||
@see evas_object_textgrid_font_source_set()
|
||||
@see evas_object_textgrid_font_source_get()
|
||||
|
||||
@since 1.7 */
|
||||
}
|
||||
get {
|
||||
/*@
|
||||
@brief Retrieve the font family and size in use on a given textgrid object.
|
||||
|
||||
This function allows the font name and size of a textgrid object
|
||||
@p obj to be queried and stored respectively in the buffers
|
||||
@p font_name and @p font_size. Be aware that the font name string is
|
||||
still owned by Evas and should @b not have free() called on it by
|
||||
the caller of the function. On error, the font name is the empty
|
||||
string and the font size is 0. @p font_name and @p font_source can
|
||||
be @c NULL.
|
||||
|
||||
@see evas_object_textgrid_font_set()
|
||||
@see evas_object_textgrid_font_source_set()
|
||||
@see evas_object_textgrid_font_source_get()
|
||||
|
||||
@since 1.7 */
|
||||
}
|
||||
values {
|
||||
const(char)* font_name; /*@ The font (family) name. */
|
||||
Evas_Font_Size font_size; /*@ The font size, in points. */
|
||||
}
|
||||
}
|
||||
size {
|
||||
set {
|
||||
/*@
|
||||
|
@ -275,6 +195,9 @@ class Evas.Textgrid (Evas.Object)
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Eo.Base.dbg_info_get;
|
||||
Efl.Text_Properties.font.get;
|
||||
Efl.Text_Properties.font.set;
|
||||
Efl.Text_Properties.font_source.get;
|
||||
Efl.Text_Properties.font_source.set;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue