forked from enlightenment/efl
Efl interfaces: Start using the text_properties interface.
This commit is contained in:
parent
17cf3242bb
commit
bf55348a92
|
@ -1566,6 +1566,7 @@ EFL_PLATFORM_DEPEND([EVAS], [all])
|
||||||
EFL_INTERNAL_DEPEND_PKG([EVAS], [eo])
|
EFL_INTERNAL_DEPEND_PKG([EVAS], [eo])
|
||||||
EFL_INTERNAL_DEPEND_PKG([EVAS], [eet])
|
EFL_INTERNAL_DEPEND_PKG([EVAS], [eet])
|
||||||
EFL_INTERNAL_DEPEND_PKG([EVAS], [eina])
|
EFL_INTERNAL_DEPEND_PKG([EVAS], [eina])
|
||||||
|
EFL_INTERNAL_DEPEND_PKG([EVAS], [efl])
|
||||||
|
|
||||||
EFL_ADD_LIBS([EVAS], [-lm])
|
EFL_ADD_LIBS([EVAS], [-lm])
|
||||||
|
|
||||||
|
|
|
@ -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_SOURCES = tests/ecore_cxx/cxx_compile_test.cc
|
||||||
tests_ecore_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
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_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_cxx\" \
|
||||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
|
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_cxx\" \
|
||||||
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
|
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EINA_CFLAGS@ \
|
||||||
|
|
|
@ -3,7 +3,8 @@ if HAVE_CXX11
|
||||||
### Generated headers
|
### Generated headers
|
||||||
|
|
||||||
generated_efl_cxx_bindings = \
|
generated_efl_cxx_bindings = \
|
||||||
lib/efl/interfaces/efl_interface_file.eo.hh
|
lib/efl/interfaces/efl_interface_file.eo.hh \
|
||||||
|
lib/efl/interfaces/efl_interface_text_properties.eo.hh
|
||||||
|
|
||||||
lib/efl/Efl.hh: $(generated_efl_cxx_bindings)
|
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 "#ifndef EFL_CXX_EDJE_HH\n#define EFL_CXX_EDJE_HH\n" > $(top_builddir)/src/lib/efl/Efl.hh
|
||||||
|
|
|
@ -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_SOURCES = tests/evas_cxx/cxx_compile_test.cc
|
||||||
tests_evas_cxx_cxx_compile_test_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
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_SRC_DIR=\"$(top_srcdir)/src/tests/evas_cxx\" \
|
||||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/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@ \
|
@CHECK_CFLAGS@ @ECORE_CXX_CFLAGS@ @EINA_CXX_CFLAGS@ @EVAS_CXX_CFLAGS@ @EO_CXX_CFLAGS@ \
|
||||||
|
|
|
@ -99,7 +99,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
|
evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
|
||||||
evas_obj_text_font_set(font, size),
|
efl_interface_text_properties_font_set(font, size),
|
||||||
evas_obj_text_set(text),
|
evas_obj_text_set(text),
|
||||||
evas_obj_size_set(sw, sh));
|
evas_obj_size_set(sw, sh));
|
||||||
|
|
||||||
|
@ -289,12 +289,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
{
|
{
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
|
|
||||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
if (inlined_font) efl_interface_text_properties_font_source_set(ed->path);
|
||||||
else evas_obj_text_font_source_set(NULL);
|
else efl_interface_text_properties_font_source_set(NULL);
|
||||||
|
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
|
|
||||||
evas_obj_text_font_set(font, size);
|
efl_interface_text_properties_font_set(font, size);
|
||||||
evas_obj_text_set(text));
|
evas_obj_text_set(text));
|
||||||
|
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
|
@ -305,12 +305,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
|
|
||||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
if (inlined_font) efl_interface_text_properties_font_source_set(ed->path);
|
||||||
else evas_obj_text_font_source_set(NULL);
|
else efl_interface_text_properties_font_source_set(NULL);
|
||||||
|
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
|
|
||||||
evas_obj_text_font_set(font, size));
|
efl_interface_text_properties_font_set(font, size));
|
||||||
|
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
}
|
}
|
||||||
|
@ -329,12 +329,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
|
|
||||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
if (inlined_font) efl_interface_text_properties_font_source_set(ed->path);
|
||||||
else evas_obj_text_font_source_set(NULL);
|
else efl_interface_text_properties_font_source_set(NULL);
|
||||||
|
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
|
|
||||||
evas_obj_text_font_set(font, size);
|
efl_interface_text_properties_font_set(font, size);
|
||||||
evas_obj_text_set(text));
|
evas_obj_text_set(text));
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
|
|
||||||
|
@ -354,11 +354,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
|
|
||||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
if (inlined_font) efl_interface_text_properties_font_source_set(ed->path);
|
||||||
else evas_obj_text_font_source_set(NULL);
|
else efl_interface_text_properties_font_source_set(NULL);
|
||||||
|
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
evas_obj_text_font_set(font, size));
|
efl_interface_text_properties_font_set(font, size));
|
||||||
|
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
if ((size > 0) && (th == 0)) break;
|
if ((size > 0) && (th == 0)) break;
|
||||||
|
@ -371,7 +371,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
evas_obj_text_font_set(font, 10));
|
efl_interface_text_properties_font_set(font, 10));
|
||||||
|
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
evas_obj_text_font_set(font, current));
|
efl_interface_text_properties_font_set(font, current));
|
||||||
|
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
evas_obj_text_font_set(font, current));
|
efl_interface_text_properties_font_set(font, current));
|
||||||
|
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
} while (th <= sh);
|
} while (th <= sh);
|
||||||
|
@ -430,8 +430,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
if (!chosen_desc->text.min_x)
|
if (!chosen_desc->text.min_x)
|
||||||
{
|
{
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
if (inlined_font) efl_interface_text_properties_font_source_set(ed->path);
|
||||||
else evas_obj_text_font_source_set(NULL));
|
else efl_interface_text_properties_font_source_set(NULL));
|
||||||
|
|
||||||
text = _edje_text_fit_x(ed, ep, params, chosen_desc,
|
text = _edje_text_fit_x(ed, ep, params, chosen_desc,
|
||||||
text, font, size,
|
text, font, size,
|
||||||
|
@ -473,12 +473,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
arrange_text:
|
arrange_text:
|
||||||
|
|
||||||
eo_do(ep->object,
|
eo_do(ep->object,
|
||||||
if (inlined_font) evas_obj_text_font_source_set(ed->path);
|
if (inlined_font) efl_interface_text_properties_font_source_set(ed->path);
|
||||||
else evas_obj_text_font_source_set(NULL);
|
else efl_interface_text_properties_font_source_set(NULL);
|
||||||
|
|
||||||
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
|
||||||
|
|
||||||
evas_obj_text_font_set(font, size),
|
efl_interface_text_properties_font_set(font, size),
|
||||||
evas_obj_text_set(text));
|
evas_obj_text_set(text));
|
||||||
part_get_geometry(ep, &tw, &th);
|
part_get_geometry(ep, &tw, &th);
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
|
|
||||||
/* Interfaces */
|
/* Interfaces */
|
||||||
#include "interfaces/efl_interface_file.eo.h"
|
#include "interfaces/efl_interface_file.eo.h"
|
||||||
|
#include "interfaces/efl_interface_text_properties.eo.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
interface Efl_Interface_Text_Properties {
|
type Efl_Font_Size: int;
|
||||||
|
|
||||||
|
interface Efl.Interface.Text_Properties {
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
properties {
|
properties {
|
||||||
font {
|
font {
|
||||||
|
@ -28,7 +30,31 @@ interface Efl_Interface_Text_Properties {
|
||||||
}
|
}
|
||||||
values {
|
values {
|
||||||
const(char) *font; /*@ The font family name or filename. */
|
const(char) *font; /*@ The font family name or filename. */
|
||||||
Evas_Font_Size size; /*@ The font size, in points. */
|
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. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,3 +5,4 @@
|
||||||
#include <Efl.h>
|
#include <Efl.h>
|
||||||
|
|
||||||
#include "interfaces/efl_interface_file.eo.c"
|
#include "interfaces/efl_interface_file.eo.c"
|
||||||
|
#include "interfaces/efl_interface_text_properties.eo.c"
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include <Eo.h>
|
#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_IN;
|
||||||
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT;
|
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT;
|
||||||
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE;
|
EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE;
|
||||||
|
|
|
@ -1287,6 +1287,67 @@ EAPI Evas_Object *evas_object_text_add(Evas *e) EINA_WARN_UNUSED_RESULT
|
||||||
|
|
||||||
#include "canvas/evas_text.eo.legacy.h"
|
#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 +1428,92 @@ EAPI Evas_Object *evas_object_textgrid_add(Evas *e);
|
||||||
|
|
||||||
#include "canvas/evas_textgrid.eo.legacy.h"
|
#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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -388,7 +388,7 @@ _evas_text_eo_base_constructor(Eo *eo_obj, Evas_Text_Data *class_data EINA_UNUSE
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_text_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source)
|
_evas_text_efl_interface_text_properties_font_source_set(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o, const char *font_source)
|
||||||
{
|
{
|
||||||
if ((o->cur.source) && (font_source) &&
|
if ((o->cur.source) && (font_source) &&
|
||||||
(!strcmp(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*
|
EOLIAN static const char*
|
||||||
_evas_text_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
_evas_text_efl_interface_text_properties_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o)
|
||||||
{
|
{
|
||||||
|
|
||||||
return o->cur.source;
|
return o->cur.source;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_text_font_set(Eo *eo_obj, Evas_Text_Data *o, const char *font, Evas_Font_Size size)
|
_evas_text_efl_interface_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 is, was = EINA_FALSE;
|
||||||
Eina_Bool pass = EINA_FALSE, freeze = 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
|
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_interface_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 (font) *font = o->cur.font;
|
||||||
if (size) *size = o->cur.size;
|
if (size) *size = o->cur.size;
|
||||||
|
@ -955,11 +955,11 @@ _evas_text_eo_base_dbg_info_get(Eo *eo_obj, Evas_Text_Data *o EINA_UNUSED, Eo_Db
|
||||||
|
|
||||||
const char *text;
|
const char *text;
|
||||||
int size;
|
int size;
|
||||||
eo_do(eo_obj, evas_obj_text_font_get(&text, &size));
|
eo_do(eo_obj, efl_interface_text_properties_font_get(&text, &size));
|
||||||
EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
|
EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
|
||||||
EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
|
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_interface_text_properties_font_source_get());
|
||||||
EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text);
|
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 = evas_obj_text_get());
|
||||||
|
@ -2475,4 +2475,30 @@ update:
|
||||||
|
|
||||||
/* EXPERIMENTAL CODE END */
|
/* EXPERIMENTAL CODE END */
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
evas_object_text_font_source_set(Eo *obj, const char *font_source)
|
||||||
|
{
|
||||||
|
eo_do((Eo *) obj, efl_interface_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_interface_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_interface_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_interface_text_properties_font_get(font, size));
|
||||||
|
}
|
||||||
|
|
||||||
#include "canvas/evas_text.eo.c"
|
#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
|
EOLIAN static void
|
||||||
_evas_textgrid_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_source)
|
_evas_textgrid_efl_interface_text_properties_font_source_set(Eo *eo_obj, Evas_Textgrid_Data *o, const char *font_source)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((!font_source) || (!*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*
|
EOLIAN static const char*
|
||||||
_evas_textgrid_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o)
|
_evas_textgrid_efl_interface_text_properties_font_source_get(Eo *eo_obj EINA_UNUSED, Evas_Textgrid_Data *o)
|
||||||
{
|
{
|
||||||
return o->cur.font_source;
|
return o->cur.font_source;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
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_interface_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);
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||||
Eina_Bool is, was = EINA_FALSE;
|
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
|
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_interface_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_name) *font_name = o->cur.font_name;
|
||||||
if (font_size) *font_size = o->cur.font_size;
|
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;
|
const char *text;
|
||||||
int size;
|
int size;
|
||||||
eo_do(eo_obj, evas_obj_textgrid_font_get(&text, &size));
|
eo_do(eo_obj, efl_interface_text_properties_font_get(&text, &size));
|
||||||
EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
|
EO_DBG_INFO_APPEND(group, "Font", EINA_VALUE_TYPE_STRING, text);
|
||||||
EO_DBG_INFO_APPEND(group, "Text size", EINA_VALUE_TYPE_INT, size);
|
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_interface_text_properties_font_source_get());
|
||||||
EO_DBG_INFO_APPEND(group, "Font source", EINA_VALUE_TYPE_STRING, text);
|
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_interface_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_interface_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_interface_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_interface_text_properties_font_get(font_name, font_size));
|
||||||
|
}
|
||||||
|
|
||||||
#include "canvas/evas_textgrid.eo.c"
|
#include "canvas/evas_textgrid.eo.c"
|
||||||
|
|
|
@ -1,32 +1,8 @@
|
||||||
class Evas.Text (Evas.Object)
|
class Evas.Text (Evas.Object, Efl.Interface.Text_Properties)
|
||||||
{
|
{
|
||||||
legacy_prefix: evas_object_text;
|
legacy_prefix: evas_object_text;
|
||||||
eo_prefix: evas_obj_text;
|
eo_prefix: evas_obj_text;
|
||||||
properties {
|
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 {
|
shadow_color {
|
||||||
set {
|
set {
|
||||||
/*@
|
/*@
|
||||||
|
@ -196,36 +172,6 @@ class Evas.Text (Evas.Object)
|
||||||
int a; /*@ The alpha component of the given color. */
|
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 {
|
style {
|
||||||
set {
|
set {
|
||||||
/*@
|
/*@
|
||||||
|
@ -439,5 +385,9 @@ class Evas.Text (Evas.Object)
|
||||||
Eo.Base.destructor;
|
Eo.Base.destructor;
|
||||||
Eo.Base.dbg_info_get;
|
Eo.Base.dbg_info_get;
|
||||||
Evas.Object.size.set;
|
Evas.Object.size.set;
|
||||||
|
Efl.Interface.Text_Properties.font.get;
|
||||||
|
Efl.Interface.Text_Properties.font.set;
|
||||||
|
Efl.Interface.Text_Properties.font_source.get;
|
||||||
|
Efl.Interface.Text_Properties.font_source.set;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,8 @@
|
||||||
class Evas.Textgrid (Evas.Object)
|
class Evas.Textgrid (Evas.Object, Efl.Interface.Text_Properties)
|
||||||
{
|
{
|
||||||
legacy_prefix: evas_object_textgrid;
|
legacy_prefix: evas_object_textgrid;
|
||||||
eo_prefix: evas_obj_textgrid;
|
eo_prefix: evas_obj_textgrid;
|
||||||
properties {
|
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 {
|
supported_font_styles {
|
||||||
set {
|
set {
|
||||||
/*@ No description supplied by the EAPI. */
|
/*@ No description supplied by the EAPI. */
|
||||||
|
@ -51,49 +14,6 @@ class Evas.Textgrid (Evas.Object)
|
||||||
Evas_Textgrid_Font_Style styles;
|
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 {
|
size {
|
||||||
set {
|
set {
|
||||||
/*@
|
/*@
|
||||||
|
@ -275,6 +195,9 @@ class Evas.Textgrid (Evas.Object)
|
||||||
Eo.Base.constructor;
|
Eo.Base.constructor;
|
||||||
Eo.Base.destructor;
|
Eo.Base.destructor;
|
||||||
Eo.Base.dbg_info_get;
|
Eo.Base.dbg_info_get;
|
||||||
|
Efl.Interface.Text_Properties.font.get;
|
||||||
|
Efl.Interface.Text_Properties.font.set;
|
||||||
|
Efl.Interface.Text_Properties.font_source.get;
|
||||||
|
Efl.Interface.Text_Properties.font_source.set;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue