We only need it in elm_config.
This removes the type Evas_Font_Hinting_Flags from EO,
as well as the functions font_hinting_set/get and
font_hinting_can_hint.
Ref T5312
}
/* NOTES:
+ - Font hinting seems to be missing!
- Elm_Color_Class list -> no need to return the struct, only the name matters
but also provide func to get desc from name
- Elm_Color_Overlay -> see with Jee-Yong and his color patch (common intf)
*/
EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
+/** Flags for Font Hinting
+ *
+ * @ingroup Evas_Font
+ */
+typedef enum
+{
+ EVAS_FONT_HINTING_NONE = 0, /**< No font hinting */
+ EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */
+ EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */
+} Evas_Font_Hinting_Flags;
+
+/**
+ * @brief Changes the font hinting for the given evas.
+ *
+ * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
+ *
+ * @param[in] hinting The used hinting, one of #EVAS_FONT_HINTING_NONE,
+ * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
+ *
+ * @ingroup Evas_Font_Group
+ */
+EAPI void evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting);
+
+/**
+ * @brief Retrieves the font hinting used by the given evas.
+ *
+ * @return The used hinting, one of #EVAS_FONT_HINTING_NONE,
+ * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
+ *
+ * @ingroup Evas_Font_Group
+ */
+EAPI Evas_Font_Hinting_Flags evas_font_hinting_get(const Evas *e);
+
+/**
+ * @brief Checks if the font hinting is supported by the given evas.
+ *
+ * One of #EVAS_FONT_HINTING_NONE, #EVAS_FONT_HINTING_AUTO,
+ * #EVAS_FONT_HINTING_BYTECODE.
+ *
+ * @param[in] hinting The hinting to use.
+ *
+ * @return @c true if it is supported, @c false otherwise.
+ *
+ * @ingroup Evas_Canvas
+ */
+EAPI Eina_Bool evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT;
+
+/**
+ * @}
+ */
+
/**
* @ingroup Evas_Object_Group_Basic
*
data: void_ptr; [[The attached pointer.]]
}
}
- @property font_hinting {
- set {
- [[Changes the font hinting for the given evas.
-
- #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
- ]]
- }
- get {
- [[Retrieves the font hinting used by the given evas.]]
- }
- values {
- hinting: Evas.Font.Hinting_Flags; [[
- The used hinting, one of #EVAS_FONT_HINTING_NONE,
- #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
- ]]
- }
- }
@property focus {
get {
[[Retrieve the object focused by the default seat.
[[Force the given evas and associated engine to flush its font cache.]]
}
- font_hinting_can_hint @const {
- [[Checks if the font hinting is supported by the given evas.
-
- One of #EVAS_FONT_HINTING_NONE, #EVAS_FONT_HINTING_AUTO,
- #EVAS_FONT_HINTING_BYTECODE.
- ]]
- return: bool @warn_unused; [[$true if it is supported, $false otherwise.]]
- params {
- @in hinting: Evas.Font.Hinting_Flags; [[The hinting to use.]]
- }
- }
object_top_at_xy_get @const {
[[Retrieve the Evas object stacked at the top of a given position
in a canvas.
}
}
-EOLIAN void
-_evas_canvas_font_hinting_set(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Font_Hinting_Flags hinting)
+EAPI void
+evas_font_hinting_set(Eo *eo_e, Evas_Font_Hinting_Flags hinting)
{
Evas_Layer *lay;
+ EVAS_LEGACY_API(eo_e, e);
evas_canvas_async_block(e);
if (e->hinting == hinting) return;
e->hinting = hinting;
}
}
-EOLIAN Evas_Font_Hinting_Flags
-_evas_canvas_font_hinting_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e)
+EAPI Evas_Font_Hinting_Flags
+evas_font_hinting_get(const Evas *eo_e)
{
+ EVAS_LEGACY_API(eo_e, e, EVAS_FONT_HINTING_NONE);
return e->hinting;
}
-EOLIAN Eina_Bool
-_evas_canvas_font_hinting_can_hint(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Font_Hinting_Flags hinting)
+EAPI Eina_Bool
+evas_font_hinting_can_hint(const Evas *eo_e, Evas_Font_Hinting_Flags hinting)
{
+ EVAS_LEGACY_API(eo_e, e, EINA_FALSE);
if (e->engine.func->font_hinting_can_hint && _evas_engine_context(e))
return e->engine.func->font_hinting_can_hint(_evas_engine_context(e),
hinting);
#include "evas_common_private.h"
#include "evas_private.h"
-#define EVAS_LEGACY_API(_obj, _e, ...) \
- Evas_Public_Data *_e = (_obj && efl_isa(_obj, EVAS_CANVAS_CLASS)) ? \
- efl_data_scope_get(_obj, EVAS_CANVAS_CLASS) : NULL; \
- if (!_e) return __VA_ARGS__
-
void
_evas_touch_point_append(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y)
{
type Evas.Modifier_Mask: ullong; [[An Evas modifier mask type]]
type Evas.Coord: int; [[A type for coordinates]]
-enum Evas.Font.Hinting_Flags {
- [[Flags for Font Hinting]]
- legacy: Evas_Font_Hinting;
-
- none, [[No font hinting]]
- auto, [[Automatic font hinting]]
- bytecode [[Bytecode font hinting]]
-}
-
struct Evas.Modifier; [[An opaque type containing information on which modifier keys are registered in an Evas canvas]]
struct Evas.Lock; [[An opaque type containing information on which lock keys are registered in an Evas canvas]]
} } while (0)
#endif
+#define EVAS_LEGACY_API(_obj, _e, ...) \
+ Evas_Public_Data *_e = (_obj && efl_isa(_obj, EVAS_CANVAS_CLASS)) ? \
+ efl_data_scope_get(_obj, EVAS_CANVAS_CLASS) : NULL; \
+ if (!_e) return __VA_ARGS__
+
#define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(cur, prev) \
if (cur->u.file && !cur->mmaped_source) \
{ \