GitLab has been upgraded to 13.3.6. If you encounter any issues mail code@riscosopen.org

Commit 56afccc6 authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL

Add minimalist Wimp_ReadSysInfo 21 implementation

Since our text selection model follows the Style Guide and there's no means to configure it to the contrary, this subreason can just return fixed values to allow applications to query the state compared with running on a non-Cut-n-Paste Wimp.
parent 2c8fa7c2
......@@ -177,7 +177,7 @@ WimpSysInfo_ScrollPause # 1 ; Wimp 3.99 onwards
WimpSysInfo_Reserved_ROL18 # 1 ; RISC OS Select
WimpSysInfo_Reserved_ROL19 # 1 ; RISC OS Select
WimpSysInfo_Reserved_ROL20 # 1 ; RISC OS Select
WimpSysInfo_Reserved_ROL21 # 1 ; RISC OS Select
WimpSysInfo_TextSelection # 1 ; Wimp 5.79 and RISC OS Select onwards
WimpSysInfo_Reserved_ROL22 # 1 ; RISC OS Select
WimpSysInfo_DragPause # 1 ; Wimp 5.14 onwards
WimpSysInfo_DoubleClickPause # 1 ; Wimp 5.14 onwards
......@@ -221,6 +221,19 @@ WimpTextOp_RightJustify * 1 :SHL: 31
WimpTextOp_VerticalJustify * 1 :SHL: 30
WimpTextOp_Style * 1 :SHL: 29
; Flags for Wimp_ReadSysInfo text selection
WimpTextSelection_Enabled * 1:SHL:0 ; Wimp CnP in writeables
WimpTextSelection_EffectNOP * 0
WimpTextSelection_EffectDelete * 1
WimpTextSelection_EffectClear * 2
WimpTextSelection_EffectCut * 3
WimpTextSelection_EffectMask * 2_11 ; 2 bits to describe the effect
WimpTextSelection_InsertEffectShift * 1 ; Insert key and synonyms
WimpTextSelection_DeleteEffectShift * 3 ; Delete key and synonyms
WimpTextSelection_MoveEffectShift * 5 ; Caret moved with cursors
WimpTextSelection_AutoSelectEnabled * 1:SHL:7 ; Text is auto-selected when caret enters
; Priority for Wimp_CreateIcon (iconbar)
WimpPriority_Maximum * &78000000 ; used for handle = -3 or -4
......
......@@ -5523,7 +5523,7 @@ SWIWimp_ReadSysInfo
B err_badR0 ; 18= ? (ROL)
B err_badR0 ; 19= priority sprite area (ROL)
B err_badR0 ; 20= special highlight colour (ROL)
B err_badR0 ; 21= text selection behaviour (ROL)
B sysinfo_textselection ; 21= text selection behaviour
B err_badR0 ; 22= caret colour (ROL)
B sysinfo_dragging ; 23= mouse drag delay
B sysinfo_doubleclicks ; 24= double click delay
......@@ -5612,6 +5612,16 @@ sysinfo_IconBarInt
STMIA sp,{R1-R4}
B ExitWimp
sysinfo_textselection
MOV R0,#-1 ; fg always from icon's own colours
MOV R1,#-1 ; bg always from icon's own colours
MOV R2,#WimpTextSelection_Enabled :OR: \
(WimpTextSelection_EffectDelete:SHL:WimpTextSelection_InsertEffectShift) :OR: \
(WimpTextSelection_EffectCut:SHL:WimpTextSelection_DeleteEffectShift) :OR: \
(WimpTextSelection_EffectClear:SHL:WimpTextSelection_MoveEffectShift)
STMIA sp,{R1-R2}
B ExitWimp
sysinfo_dragging
LDRB R0,drag_movelimit
LDR R1,drag_timelimit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment