feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TEXT_SERVER_DUMMY_H
|
||||
#define TEXT_SERVER_DUMMY_H
|
||||
#pragma once
|
||||
|
||||
#include "servers/text/text_server_extension.h"
|
||||
|
||||
|
|
@ -124,5 +123,3 @@ public:
|
|||
virtual double shaped_text_get_underline_position(const RID &p_shaped) const override { return 0; }
|
||||
virtual double shaped_text_get_underline_thickness(const RID &p_shaped) const override { return 0; }
|
||||
};
|
||||
|
||||
#endif // TEXT_SERVER_DUMMY_H
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ void TextServerExtension::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");
|
||||
GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");
|
||||
|
||||
GDVIRTUAL_BIND(_font_set_modulate_color_glyphs, "font_rid", "modulate");
|
||||
GDVIRTUAL_BIND(_font_is_modulate_color_glyphs, "font_rid");
|
||||
|
||||
GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");
|
||||
GDVIRTUAL_BIND(_font_get_hinting, "font_rid");
|
||||
|
||||
|
|
@ -265,12 +268,24 @@ void TextServerExtension::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");
|
||||
GDVIRTUAL_BIND(_shaped_text_add_object, "shaped", "key", "size", "inline_align", "length", "baseline");
|
||||
GDVIRTUAL_BIND(_shaped_text_resize_object, "shaped", "key", "size", "inline_align", "baseline");
|
||||
GDVIRTUAL_BIND(_shaped_get_text, "shaped");
|
||||
|
||||
GDVIRTUAL_BIND(_shaped_get_span_count, "shaped");
|
||||
GDVIRTUAL_BIND(_shaped_get_span_meta, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_span_embedded_object, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_span_text, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_span_object, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_set_span_update_font, "shaped", "index", "fonts", "size", "opentype_features");
|
||||
|
||||
GDVIRTUAL_BIND(_shaped_get_run_count, "shaped");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_text, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_range, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_font_rid, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_font_size, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_language, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_direction, "shaped", "index");
|
||||
GDVIRTUAL_BIND(_shaped_get_run_object, "shaped", "index");
|
||||
|
||||
GDVIRTUAL_BIND(_shaped_text_substr, "shaped", "start", "length");
|
||||
GDVIRTUAL_BIND(_shaped_text_get_parent, "shaped");
|
||||
|
||||
|
|
@ -631,6 +646,16 @@ bool TextServerExtension::font_is_force_autohinter(const RID &p_font_rid) const
|
|||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) {
|
||||
GDVIRTUAL_CALL(_font_set_modulate_color_glyphs, p_font_rid, p_modulate);
|
||||
}
|
||||
|
||||
bool TextServerExtension::font_is_modulate_color_glyphs(const RID &p_font_rid) const {
|
||||
bool ret = false;
|
||||
GDVIRTUAL_CALL(_font_is_modulate_color_glyphs, p_font_rid, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
|
||||
GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);
|
||||
}
|
||||
|
|
@ -1181,6 +1206,12 @@ bool TextServerExtension::shaped_text_resize_object(const RID &p_shaped, const V
|
|||
return ret;
|
||||
}
|
||||
|
||||
String TextServerExtension::shaped_get_text(const RID &p_shaped) const {
|
||||
String ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_text, p_shaped, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int64_t TextServerExtension::shaped_get_span_count(const RID &p_shaped) const {
|
||||
int64_t ret = 0;
|
||||
GDVIRTUAL_CALL(_shaped_get_span_count, p_shaped, ret);
|
||||
|
|
@ -1199,10 +1230,70 @@ Variant TextServerExtension::shaped_get_span_embedded_object(const RID &p_shaped
|
|||
return ret;
|
||||
}
|
||||
|
||||
String TextServerExtension::shaped_get_span_text(const RID &p_shaped, int64_t p_index) const {
|
||||
String ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_span_text, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Variant TextServerExtension::shaped_get_span_object(const RID &p_shaped, int64_t p_index) const {
|
||||
Variant ret = false;
|
||||
GDVIRTUAL_CALL(_shaped_get_span_object, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features) {
|
||||
GDVIRTUAL_CALL(_shaped_set_span_update_font, p_shaped, p_index, p_fonts, p_size, p_opentype_features);
|
||||
}
|
||||
|
||||
int64_t TextServerExtension::shaped_get_run_count(const RID &p_shaped) const {
|
||||
int64_t ret = 0;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_count, p_shaped, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
String TextServerExtension::shaped_get_run_text(const RID &p_shaped, int64_t p_index) const {
|
||||
String ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_text, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Vector2i TextServerExtension::shaped_get_run_range(const RID &p_shaped, int64_t p_index) const {
|
||||
Vector2i ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_range, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
RID TextServerExtension::shaped_get_run_font_rid(const RID &p_shaped, int64_t p_index) const {
|
||||
RID ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_font_rid, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int TextServerExtension::shaped_get_run_font_size(const RID &p_shaped, int64_t p_index) const {
|
||||
int ret = 0;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_font_size, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
String TextServerExtension::shaped_get_run_language(const RID &p_shaped, int64_t p_index) const {
|
||||
String ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_language, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
TextServer::Direction TextServerExtension::shaped_get_run_direction(const RID &p_shaped, int64_t p_index) const {
|
||||
TextServer::Direction ret = TextServer::DIRECTION_LTR;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_direction, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Variant TextServerExtension::shaped_get_run_object(const RID &p_shaped, int64_t p_index) const {
|
||||
Variant ret;
|
||||
GDVIRTUAL_CALL(_shaped_get_run_object, p_shaped, p_index, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
RID TextServerExtension::shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const {
|
||||
RID ret;
|
||||
GDVIRTUAL_CALL(_shaped_text_substr, p_shaped, p_start, p_length, ret);
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TEXT_SERVER_EXTENSION_H
|
||||
#define TEXT_SERVER_EXTENSION_H
|
||||
#pragma once
|
||||
|
||||
#include "core/object/gdvirtual.gen.inc"
|
||||
#include "core/os/thread_safe.h"
|
||||
|
|
@ -205,6 +204,11 @@ public:
|
|||
GDVIRTUAL2(_font_set_force_autohinter, RID, bool);
|
||||
GDVIRTUAL1RC(bool, _font_is_force_autohinter, RID);
|
||||
|
||||
virtual void font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) override;
|
||||
virtual bool font_is_modulate_color_glyphs(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2(_font_set_modulate_color_glyphs, RID, bool);
|
||||
GDVIRTUAL1RC(bool, _font_is_modulate_color_glyphs, RID);
|
||||
|
||||
virtual void font_set_hinting(const RID &p_font_rid, Hinting p_hinting) override;
|
||||
virtual Hinting font_get_hinting(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2(_font_set_hinting, RID, Hinting);
|
||||
|
|
@ -442,15 +446,39 @@ public:
|
|||
GDVIRTUAL6R_REQUIRED(bool, _shaped_text_add_object, RID, const Variant &, const Size2 &, InlineAlignment, int64_t, double);
|
||||
GDVIRTUAL5R_REQUIRED(bool, _shaped_text_resize_object, RID, const Variant &, const Size2 &, InlineAlignment, double);
|
||||
|
||||
virtual String shaped_get_text(const RID &p_shaped) const override;
|
||||
GDVIRTUAL1RC_REQUIRED(String, _shaped_get_text, RID);
|
||||
|
||||
virtual int64_t shaped_get_span_count(const RID &p_shaped) const override;
|
||||
virtual Variant shaped_get_span_meta(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual Variant shaped_get_span_embedded_object(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual String shaped_get_span_text(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual Variant shaped_get_span_object(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual void shaped_set_span_update_font(const RID &p_shaped, int64_t p_index, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features = Dictionary()) override;
|
||||
GDVIRTUAL1RC_REQUIRED(int64_t, _shaped_get_span_count, RID);
|
||||
GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_meta, RID, int64_t);
|
||||
GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_embedded_object, RID, int64_t);
|
||||
GDVIRTUAL2RC_REQUIRED(String, _shaped_get_span_text, RID, int64_t);
|
||||
GDVIRTUAL2RC_REQUIRED(Variant, _shaped_get_span_object, RID, int64_t);
|
||||
GDVIRTUAL5_REQUIRED(_shaped_set_span_update_font, RID, int64_t, const TypedArray<RID> &, int64_t, const Dictionary &);
|
||||
|
||||
virtual int64_t shaped_get_run_count(const RID &p_shaped) const override;
|
||||
virtual String shaped_get_run_text(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual Vector2i shaped_get_run_range(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual RID shaped_get_run_font_rid(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual int shaped_get_run_font_size(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual String shaped_get_run_language(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual Direction shaped_get_run_direction(const RID &p_shaped, int64_t p_index) const override;
|
||||
virtual Variant shaped_get_run_object(const RID &p_shaped, int64_t p_index) const override;
|
||||
GDVIRTUAL1RC(int64_t, _shaped_get_run_count, RID);
|
||||
GDVIRTUAL2RC(String, _shaped_get_run_text, RID, int64_t);
|
||||
GDVIRTUAL2RC(Vector2i, _shaped_get_run_range, RID, int64_t);
|
||||
GDVIRTUAL2RC(RID, _shaped_get_run_font_rid, RID, int64_t);
|
||||
GDVIRTUAL2RC(int, _shaped_get_run_font_size, RID, int64_t);
|
||||
GDVIRTUAL2RC(String, _shaped_get_run_language, RID, int64_t);
|
||||
GDVIRTUAL2RC(Direction, _shaped_get_run_direction, RID, int64_t);
|
||||
GDVIRTUAL2RC(Variant, _shaped_get_run_object, RID, int64_t);
|
||||
|
||||
virtual RID shaped_text_substr(const RID &p_shaped, int64_t p_start, int64_t p_length) const override;
|
||||
virtual RID shaped_text_get_parent(const RID &p_shaped) const override;
|
||||
GDVIRTUAL3RC_REQUIRED(RID, _shaped_text_substr, RID, int64_t, int64_t);
|
||||
|
|
@ -598,5 +626,3 @@ public:
|
|||
TextServerExtension();
|
||||
~TextServerExtension();
|
||||
};
|
||||
|
||||
#endif // TEXT_SERVER_EXTENSION_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue