From 3dd439e6258d14532ccf0bbe69543c99afdb6334 Mon Sep 17 00:00:00 2001 From: Samuel Gomes Date: Wed, 26 Apr 2023 22:36:24 +0530 Subject: [PATCH] Change function names --- internal/c/libqb/include/font.h | 6 +++--- internal/c/parts/video/font/font.cpp | 6 +++--- source/subs_functions/subs_functions.bas | 18 +++++++++--------- .../subs_functions/syntax_highlighter_list.bas | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/c/libqb/include/font.h b/internal/c/libqb/include/font.h index 57fe47f80..13d59cb9a 100644 --- a/internal/c/libqb/include/font.h +++ b/internal/c/libqb/include/font.h @@ -49,7 +49,7 @@ bool FontRenderTextASCII(int32_t fh, const uint8_t *codepoint, int32_t codepoint int32_t FontPrintWidthUTF32(int32_t fh, const uint32_t *codepoint, int32_t codepoints); int32_t FontPrintWidthASCII(int32_t fh, const uint8_t *codepoint, int32_t codepoints); -int32_t func__UPrintHeight(int32_t qb64_fh, int32_t passed); +int32_t func__UFontHeight(int32_t qb64_fh, int32_t passed); int32_t func__UPrintWidth(const qbs *text, int32_t utf_encoding, int32_t qb64_fh, int32_t passed); -int32_t func__UPrintLineSpacing(int32_t qb64_fh, int32_t passed); -void sub__UPrint(int32_t start_x, int32_t start_y, const qbs *text, int32_t max_width, int32_t utf_encoding, int32_t qb64_fh, int32_t passed); +int32_t func__ULineSpacing(int32_t qb64_fh, int32_t passed); +void sub__UPrintString(int32_t start_x, int32_t start_y, const qbs *text, int32_t max_width, int32_t utf_encoding, int32_t qb64_fh, int32_t passed); diff --git a/internal/c/parts/video/font/font.cpp b/internal/c/parts/video/font/font.cpp index 4a3f42320..8c0c711a5 100644 --- a/internal/c/parts/video/font/font.cpp +++ b/internal/c/parts/video/font/font.cpp @@ -1052,7 +1052,7 @@ bool FontRenderTextASCII(int32_t fh, const uint8_t *codepoint, int32_t codepoint /// @param qb64_fh A QB64 font handle (this can be a builtin font as well) /// @param passed Optional arguments flag /// @return The height in pixels -int32_t func__UPrintHeight(int32_t qb64_fh, int32_t passed) { +int32_t func__UFontHeight(int32_t qb64_fh, int32_t passed) { if (new_error) return 0; @@ -1162,7 +1162,7 @@ int32_t func__UPrintWidth(const qbs *text, int32_t utf_encoding, int32_t qb64_fh /// @param qb64_fh A QB64 font handle (this can be a builtin font as well) /// @param passed Optional arguments flag /// @return The vertical spacing in pixels -int32_t func__UPrintLineSpacing(int32_t qb64_fh, int32_t passed) { +int32_t func__ULineSpacing(int32_t qb64_fh, int32_t passed) { if (new_error) return 0; @@ -1196,7 +1196,7 @@ int32_t func__UPrintLineSpacing(int32_t qb64_fh, int32_t passed) { /// @param utf_encoding The UTF encoding of the text (0 = ASCII, 8 = UTF-8, 16 - UTF-16, 32 = UTF-32) /// @param qb64_fh A QB64 font handle (this can be a builtin font as well) /// @param passed Optional arguments flag -void sub__UPrint(int32_t start_x, int32_t start_y, const qbs *text, int32_t max_width, int32_t utf_encoding, int32_t qb64_fh, int32_t passed) { +void sub__UPrintString(int32_t start_x, int32_t start_y, const qbs *text, int32_t max_width, int32_t utf_encoding, int32_t qb64_fh, int32_t passed) { if (new_error || !text->len) return; diff --git a/source/subs_functions/subs_functions.bas b/source/subs_functions/subs_functions.bas index 138170939..5c2c5863f 100644 --- a/source/subs_functions/subs_functions.bas +++ b/source/subs_functions/subs_functions.bas @@ -1429,15 +1429,15 @@ regid ' a740g: Extended Font support clearid -id.n = qb64prefix$ + "UPrintHeight" +id.n = qb64prefix$ + "UFontHeight" id.Dependency = DEPENDENCY_LOADFONT id.subfunc = 1 -id.callname = "func__UPrintHeight" +id.callname = "func__UFontHeight" id.args = 1 id.arg = MKL$(LONGTYPE - ISPOINTER) id.specialformat = "[?]" id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_UPRINTHEIGHT&[(fontHandle&)]" +id.hr_syntax = "_UFONTHEIGHT&[(fontHandle&)]" regid clearid @@ -1453,27 +1453,27 @@ id.hr_syntax = "_UPRINTWIDTH&(text$[, utfEncoding&][, fontHandle&])" regid clearid -id.n = qb64prefix$ + "UPrintLineSpacing" +id.n = qb64prefix$ + "ULineSpacing" id.Dependency = DEPENDENCY_LOADFONT id.subfunc = 1 -id.callname = "func__UPrintLineSpacing" +id.callname = "func__ULineSpacing" id.args = 1 id.arg = MKL$(LONGTYPE - ISPOINTER) id.specialformat = "[?]" id.ret = LONGTYPE - ISPOINTER -id.hr_syntax = "_UPRINTLINESPACING&[(fontHandle&)]" +id.hr_syntax = "_ULINESPACING&[(fontHandle&)]" regid regid clearid -id.n = qb64prefix$ + "UPrint" +id.n = qb64prefix$ + "UPrintString" id.Dependency = DEPENDENCY_LOADFONT id.subfunc = 2 -id.callname = "sub__UPrint" +id.callname = "sub__UPrintString" id.args = 6 id.arg = MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(STRINGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER) id.specialformat = "(?,?),?[,[?][,[?][,?]]]" -id.hr_syntax = "_UPRINT (x&, y&), text$[, maxWidth&][, utfEncoding&][, fontHandle&]" +id.hr_syntax = "_UPRINTSTRING (x&, y&), text$[, maxWidth&][, utfEncoding&][, fontHandle&]" regid 'WORKING WITH COLORS diff --git a/source/subs_functions/syntax_highlighter_list.bas b/source/subs_functions/syntax_highlighter_list.bas index 16fac68b4..c819d856d 100644 --- a/source/subs_functions/syntax_highlighter_list.bas +++ b/source/subs_functions/syntax_highlighter_list.bas @@ -6,5 +6,5 @@ listOfKeywords$ = listOfKeywords$ + "_GLPOPATTRIB@_GLPOPCLIENTATTRIB@_GLPOPMATRI listOfKeywords$ = listOfKeywords$ + "_SOFTWARE@_SQUAREPIXELS@_STRETCH@_ALLOWFULLSCREEN@_ALL@_ECHO@_INSTRREV@_TRIM$@_ACCEPTFILEDROP@_FINISHDROP@_TOTALDROPPEDFILES@_DROPPEDFILE@_DROPPEDFILE$@_SHR@_SHL@_ROR@_ROL@" ' a740g: added ROR & ROL listOfKeywords$ = listOfKeywords$ + "_DEFLATE$@_INFLATE$@_READBIT@_RESETBIT@_SETBIT@_TOGGLEBIT@$ASSERTS@_ASSERT@_CAPSLOCK@_NUMLOCK@_SCROLLLOCK@_TOGGLE@_CONSOLEFONT@_CONSOLECURSOR@_CONSOLEINPUT@_CINP@$NOPREFIX@$COLOR@$DEBUG@_ENVIRONCOUNT@$UNSTABLE@$MIDISOUNDFONT@" listOfKeywords$ = listOfKeywords$ + "_NOTIFYPOPUP@_MESSAGEBOX@_INPUTBOX$@_SELECTFOLDERDIALOG$@_COLORCHOOSERDIALOG@_OPENFILEDIALOG$@_SAVEFILEDIALOG$@" ' a740g: added common dialog keywords -listOfKeywords$ = listOfKeywords$ + "_STATUSCODE@_SNDNEW@_SCALEDWIDTH@_SCALEDHEIGHT@_UPRINTHEIGHT@_UPRINTWIDTH@_UPRINTLINESPACING@_UPRINT@" +listOfKeywords$ = listOfKeywords$ + "_STATUSCODE@_SNDNEW@_SCALEDWIDTH@_SCALEDHEIGHT@_UFONTHEIGHT@_UPRINTWIDTH@_ULINESPACING@_UPRINTSTRING@"