[vte/wip/egmont/bidi: 20/23] doc
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/egmont/bidi: 20/23] doc
- Date: Fri, 31 May 2019 13:05:03 +0000 (UTC)
commit 9fd0f6de0dc3b35503a3e2da1bef020332715c91
Author: Egmont Koblinger <egmont gmail com>
Date: Tue May 28 14:40:57 2019 +0200
doc
BIDI-STATUS | 7 +++----
src/bidi.cc | 3 ++-
src/modes-ecma.hh | 5 +++--
src/modes-private.hh | 6 ++++++
src/vte.cc | 3 ++-
src/vtedraw.cc | 1 -
src/vteseq.cc | 57 ++++++++++++++++++++++++++++++++++------------------
7 files changed, 54 insertions(+), 28 deletions(-)
---
diff --git a/BIDI-STATUS b/BIDI-STATUS
index 1a29c4f4..4f9b665a 100644
--- a/BIDI-STATUS
+++ b/BIDI-STATUS
@@ -1,6 +1,6 @@
Done:
- Implicit (level 1) and Explicit (a small subset only) modes (SM / RM 8).
-- Overall LTR or RTL direction (SPD 0 / 3 or SCP 1 / 2).
+- Overall LTR or RTL direction (SCP 1 / 2 or SPD 0 / 3).
- Possibility to autodetect paragraph direction (DECSET / DECRST 2501).
- Possibility to make box drawing characters mirrorable (DECSET / DECRST 2500).
- I-Beam cursor shows the character's resolved directionality when the
@@ -19,7 +19,8 @@ Bugs:
- The way the modes apply to paragraphs, and what happens when a paragraph
is split or two paragraphs are joined is just a first hack, needs to be
reviewed, adjusted, fixed properly.
-- SPD should also update all the onscreen lines.
+- SPD should also update all the onscreen lines – really?
+- Or should we drop SPD?
Missing from first release:
- The entire screen is always invalidated. Have some more fine grained
@@ -27,8 +28,6 @@ Missing from first release:
- Probably we'd need to make Erase in Display (Below or All) sequences turn
the previous line to hard wrapped, requiring to keep one more line in the
ring's writable area.
-- Design doc review & publishing, public tracking issue.
-- Brief summary about the design and implemented features in the source tree.
- Code cleanup and review, of course.
Planned future improvements:
diff --git a/src/bidi.cc b/src/bidi.cc
index 1a3b0ee8..f902dc67 100644
--- a/src/bidi.cc
+++ b/src/bidi.cc
@@ -20,7 +20,8 @@
* This class implements mapping the logical letters to their visual positions
* according to the modes tracked for each paragraph.
*
- * BiDi is implemented according to https://terminal-wg.pages.freedesktop.org/bidi/
+ * BiDi is implemented according to Terminal-wg/bidi v0.2:
+ * https://terminal-wg.pages.freedesktop.org/bidi/
*/
#include <config.h>
diff --git a/src/modes-ecma.hh b/src/modes-ecma.hh
index 9c767ac1..3c862be7 100644
--- a/src/modes-ecma.hh
+++ b/src/modes-ecma.hh
@@ -45,10 +45,10 @@ MODE(IRM, 4)
*
* References: ECMA-48
* ECMA TR/53
- * [FIXME link to our spec]
+ * Terminal-wg/bidi
*
* Default in ECMA: reset
- * Default in VTE: set
+ * Default in Terminal-wg/bidi and VTE: set
*/
MODE(BDSM, 8)
@@ -73,6 +73,7 @@ MODE_FIXED(CRM, 3, ALWAYS_RESET)
MODE_FIXED(SRTM, 5, ALWAYS_RESET)
MODE_FIXED(ERM, 6, ALWAYS_RESET)
MODE_FIXED(VEM, 7, ALWAYS_RESET)
+/* DCSM defaults to RESET in ECMA, forced to SET in Terminal-wg/bidi */
MODE_FIXED(DCSM, 9, ALWAYS_SET)
MODE_FIXED(HEM, 10, ALWAYS_RESET)
MODE_FIXED(PUM, 11, ALWAYS_RESET) /* ECMA-48 § F.4.1 Deprecated */
diff --git a/src/modes-private.hh b/src/modes-private.hh
index 80bc80d2..7fa7049c 100644
--- a/src/modes-private.hh
+++ b/src/modes-private.hh
@@ -150,6 +150,8 @@ MODE(URXVT_MOUSE_EXT, 1015)
*
* The (temporary) choice of number 2500 is a misuse of hex 2500
* as a decimal number, but is supposed to be easily memorable.
+ *
+ * Reference: Terminal-wg/bidi
*/
MODE(VTE_BOX_DRAWING_MIRROR, 2500)
@@ -157,6 +159,8 @@ MODE(VTE_BOX_DRAWING_MIRROR, 2500)
* Whether BiDi paragraph direction is autodetected.
*
* The number choice is temporary.
+ *
+ * Reference: Terminal-wg/bidi
*/
MODE(VTE_BIDI_AUTO, 2501)
@@ -165,6 +169,8 @@ MODE(VTE_BIDI_AUTO, 2501)
* stands over an RTL paragraphs.
*
* The number choice is not necessarily final.
+ *
+ * Reference: Terminal-wg/bidi
*/
MODE(VTE_BIDI_SWAP_ARROW_KEYS, 1243)
diff --git a/src/vte.cc b/src/vte.cc
index 6c34f627..9565f456 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -1635,7 +1635,8 @@ Terminal::confine_grid_coords(vte::grid::coords const& rowcol) const
* Left/start margin or anything further to the left/start is denoted by column -1's right half,
* right/end margin or anything further to the right/end is denoted by column m_column_count's left half.
*
- * BiDi: returns logical (start/end) position for normal selection modes, visual (left/right) position for
block mode.
+ * BiDi: returns logical position (start or end) for normal selection modes, visual position (left or
+ * right) for block mode.
*/
vte::grid::halfcoords
Terminal::selection_grid_halfcoords_from_view_coords(vte::view::coords const& pos) const
diff --git a/src/vtedraw.cc b/src/vtedraw.cc
index aafb012b..6314c956 100644
--- a/src/vtedraw.cc
+++ b/src/vtedraw.cc
@@ -1490,7 +1490,6 @@ _vte_draw_text_internal (struct _vte_draw *draw,
vteunistr c = requests[i].c;
if (G_UNLIKELY (requests[i].mirror)) {
- // FIXME what if 'c' is actually a real vteunistr?
vte_bidi_get_mirror_char (c, requests[i].box_mirror, &c);
}
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 59387676..1a80ea74 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -4981,8 +4981,11 @@ Terminal::DL(vte::parser::Sequence const& seq)
* DL - delete-line
* Delete lines starting from the active line (presentation).
*
- * This function is affected by the DCSM, TSM and VEM modes,
- * and the SLH and SEE functions.
+ * Depending on DCSM, this function works on the presentation
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
+ *
+ * Also affected by TSM and VEM modes, and the SLH and SEE
+ * functions.
*
* Arguments:
* args[0]: number of lines to delete
@@ -4991,6 +4994,7 @@ Terminal::DL(vte::parser::Sequence const& seq)
* args[0]: 1
*
* References: ECMA-48 § 8.3.32
+ * Terminal-wg/bidi
*/
#if 0
unsigned int num = 1;
@@ -5317,9 +5321,10 @@ Terminal::EA(vte::parser::Sequence const& seq)
* ERM is reset, erases all areas.
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.37
+ * Terminal-wg/bidi
*/
switch (seq.collect1(0)) {
@@ -5350,9 +5355,10 @@ Terminal::ECH(vte::parser::Sequence const& seq)
* ERM is reset, erases all characters.
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.38
+ * Terminal-wg/bidi
*/
#if 0
unsigned int num = 1;
@@ -5401,10 +5407,11 @@ Terminal::ED(vte::parser::Sequence const& seq)
* ERM is reset, erases all characters.
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.39
* VT525
+ * Terminal-wg/bidi
*/
erase_in_display(seq);
@@ -5432,9 +5439,10 @@ Terminal::EF(vte::parser::Sequence const& seq)
* ERM is reset, erases all characters.
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.40
+ * Terminal-wg/bidi
*/
}
@@ -5461,10 +5469,11 @@ Terminal::EL(vte::parser::Sequence const& seq)
* ERM is reset, erases all characters.
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.41
* VT525
+ * Terminal-wg/bidi
*/
erase_in_line(seq);
@@ -5916,12 +5925,13 @@ Terminal::ICH(vte::parser::Sequence const& seq)
* args[0]: 1
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
* Also affected by HEM mode, and the SLH, and SEE functions.
*
* References: ECMA-48 §8.3.64
* VT525
+ * Terminal-wg/bidi
*/
#if 0
unsigned int num = 1;
@@ -5999,12 +6009,13 @@ Terminal::IL(vte::parser::Sequence const& seq)
* args[0]: 1
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* Also affected by the TSM and VEM modes,
* and the SLH and SEE functions.
*
* References: ECMA-48 § 8.3.67
+ * Terminal-wg/bidi
*/
#if 0
unsigned int num = 1;
@@ -6932,19 +6943,23 @@ Terminal::SCP(vte::parser::Sequence const& seq)
*
* Arguments:
* args[0]: path
+ * 0 in Terminal-wg/bidi and VTE = terminal's default
* 1 = LTR or TTB (for horizontal/vertical line orientation)
* 2 = RTL or BTT (for horizontal/vertical line orientation)
* args[1]: effect
- * 0 = implementation-defined
+ * 0 in ECMA = implementation-defined
+ * 0 in Terminal-wg/bidi and VTE = see Terminal-wg/bidi
* 1 = ...
* 2 = ...
*
* Defaults:
- * args[0]: no default
- * args[1]: no default
+ * args[0] in ECMA: no default
+ * args[1] in ECMA: no default
+ * args[0] in Terminal-wg/bidi: 0
+ * args[1] in Terminal-wg/bidi: 0
*
* References: ECMA-48 § 8.3.111
- * [FIXME link to our spec]
+ * Terminal-wg/bidi
*/
auto const param = seq.collect1(0);
@@ -7306,9 +7321,10 @@ Terminal::SLH(vte::parser::Sequence const& seq)
* args[0]: no default
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.122
+ * Terminal-wg/bidi
*/
}
@@ -7325,9 +7341,10 @@ Terminal::SLL(vte::parser::Sequence const& seq)
* args[0]: no default
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.123
+ * Terminal-wg/bidi
*/
}
@@ -7432,7 +7449,7 @@ Terminal::SPD(vte::parser::Sequence const& seq)
* args[1]: 0
*
* References: ECMA-48 § 8.3.130
- * [FIXME link to our spec]
+ * Terminal-wg/bidi
*/
auto const param = seq.collect1(0);
@@ -7455,7 +7472,7 @@ Terminal::SPD(vte::parser::Sequence const& seq)
maybe_apply_bidi_attributes(VTE_BIDI_RTL);
- // FIXME apply to all the onscreen lines?
+ /* FIXME maybe apply to all the onscreen lines? */
}
void
@@ -7471,9 +7488,10 @@ Terminal::SPH(vte::parser::Sequence const& seq)
* args[0]: no default
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.131
+ * Terminal-wg/bidi
*/
}
@@ -7509,9 +7527,10 @@ Terminal::SPL(vte::parser::Sequence const& seq)
* args[0]: no default
*
* Depending on DCSM, this function works on the presentation
- * or data position.
+ * or data position. Terminal-wg/bidi forces DCSM to DATA.
*
* References: ECMA-48 § 8.3.133
+ * Terminal-wg/bidi
*/
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]