@@ -217,6 +217,8 @@ public static Object getInternalTermuxPropertyValueFromValue(Context context, St
217
217
return (int ) getBellBehaviourInternalPropertyValueFromValue (value );
218
218
case TermuxPropertyConstants .KEY_TERMINAL_CURSOR_BLINK_RATE :
219
219
return (int ) getTerminalCursorBlinkRateInternalPropertyValueFromValue (value );
220
+ case TermuxPropertyConstants .KEY_TERMINAL_CURSOR_STYLE :
221
+ return (int ) getTerminalCursorStyleInternalPropertyValueFromValue (value );
220
222
case TermuxPropertyConstants .KEY_TERMINAL_TRANSCRIPT_ROWS :
221
223
return (int ) getTerminalTranscriptRowsInternalPropertyValueFromValue (value );
222
224
@@ -277,7 +279,7 @@ public static boolean getUseBlackUIInternalPropertyValueFromValue(Context contex
277
279
/**
278
280
* Returns the internal value after mapping it based on
279
281
* {@code TermuxPropertyConstants#MAP_BELL_BEHAVIOUR} if the value is not {@code null}
280
- * and is valid, otherwise returns {@code TermuxPropertyConstants#DEFAULT_IVALUE_BELL_BEHAVIOUR}.
282
+ * and is valid, otherwise returns {@link TermuxPropertyConstants#DEFAULT_IVALUE_BELL_BEHAVIOUR}.
281
283
*
282
284
* @param value The {@link String} value to convert.
283
285
* @return Returns the internal value for value.
@@ -288,14 +290,14 @@ public static int getBellBehaviourInternalPropertyValueFromValue(String value) {
288
290
289
291
/**
290
292
* Returns the int for the value if its not null and is between
291
- * {@code TermuxPropertyConstants#IVALUE_TERMINAL_CURSOR_BLINK_RATE_MIN} and
292
- * {@code TermuxPropertyConstants#IVALUE_TERMINAL_CURSOR_BLINK_RATE_MAX},
293
- * otherwise returns {@code TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_CURSOR_BLINK_RATE}.
293
+ * {@link TermuxPropertyConstants#IVALUE_TERMINAL_CURSOR_BLINK_RATE_MIN} and
294
+ * {@link TermuxPropertyConstants#IVALUE_TERMINAL_CURSOR_BLINK_RATE_MAX},
295
+ * otherwise returns {@link TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_CURSOR_BLINK_RATE}.
294
296
*
295
297
* @param value The {@link String} value to convert.
296
298
* @return Returns the internal value for value.
297
299
*/
298
- public static float getTerminalCursorBlinkRateInternalPropertyValueFromValue (String value ) {
300
+ public static int getTerminalCursorBlinkRateInternalPropertyValueFromValue (String value ) {
299
301
return SharedProperties .getDefaultIfNotInRange (TermuxPropertyConstants .KEY_TERMINAL_CURSOR_BLINK_RATE ,
300
302
DataUtils .getIntFromString (value , TermuxPropertyConstants .DEFAULT_IVALUE_TERMINAL_CURSOR_BLINK_RATE ),
301
303
TermuxPropertyConstants .DEFAULT_IVALUE_TERMINAL_CURSOR_BLINK_RATE ,
@@ -304,16 +306,28 @@ public static float getTerminalCursorBlinkRateInternalPropertyValueFromValue(Str
304
306
true , true , LOG_TAG );
305
307
}
306
308
309
+ /**
310
+ * Returns the internal value after mapping it based on
311
+ * {@link TermuxPropertyConstants#MAP_TERMINAL_CURSOR_STYLE} if the value is not {@code null}
312
+ * and is valid, otherwise returns {@link TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_CURSOR_STYLE}.
313
+ *
314
+ * @param value The {@link String} value to convert.
315
+ * @return Returns the internal value for value.
316
+ */
317
+ public static int getTerminalCursorStyleInternalPropertyValueFromValue (String value ) {
318
+ return (int ) SharedProperties .getDefaultIfNotInMap (TermuxPropertyConstants .KEY_TERMINAL_CURSOR_STYLE , TermuxPropertyConstants .MAP_TERMINAL_CURSOR_STYLE , SharedProperties .toLowerCase (value ), TermuxPropertyConstants .DEFAULT_IVALUE_TERMINAL_CURSOR_STYLE , true , LOG_TAG );
319
+ }
320
+
307
321
/**
308
322
* Returns the int for the value if its not null and is between
309
- * {@code TermuxPropertyConstants#IVALUE_TERMINAL_TRANSCRIPT_ROWS_MIN} and
310
- * {@code TermuxPropertyConstants#IVALUE_TERMINAL_TRANSCRIPT_ROWS_MAX},
311
- * otherwise returns {@code TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_TRANSCRIPT_ROWS}.
323
+ * {@link TermuxPropertyConstants#IVALUE_TERMINAL_TRANSCRIPT_ROWS_MIN} and
324
+ * {@link TermuxPropertyConstants#IVALUE_TERMINAL_TRANSCRIPT_ROWS_MAX},
325
+ * otherwise returns {@link TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_TRANSCRIPT_ROWS}.
312
326
*
313
327
* @param value The {@link String} value to convert.
314
328
* @return Returns the internal value for value.
315
329
*/
316
- public static float getTerminalTranscriptRowsInternalPropertyValueFromValue (String value ) {
330
+ public static int getTerminalTranscriptRowsInternalPropertyValueFromValue (String value ) {
317
331
return SharedProperties .getDefaultIfNotInRange (TermuxPropertyConstants .KEY_TERMINAL_TRANSCRIPT_ROWS ,
318
332
DataUtils .getIntFromString (value , TermuxPropertyConstants .DEFAULT_IVALUE_TERMINAL_TRANSCRIPT_ROWS ),
319
333
TermuxPropertyConstants .DEFAULT_IVALUE_TERMINAL_TRANSCRIPT_ROWS ,
@@ -324,9 +338,9 @@ public static float getTerminalTranscriptRowsInternalPropertyValueFromValue(Stri
324
338
325
339
/**
326
340
* Returns the int for the value if its not null and is between
327
- * {@code TermuxPropertyConstants#IVALUE_TERMINAL_TOOLBAR_HEIGHT_SCALE_FACTOR_MIN} and
328
- * {@code TermuxPropertyConstants#IVALUE_TERMINAL_TOOLBAR_HEIGHT_SCALE_FACTOR_MAX},
329
- * otherwise returns {@code TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_TOOLBAR_HEIGHT_SCALE_FACTOR}.
341
+ * {@link TermuxPropertyConstants#IVALUE_TERMINAL_TOOLBAR_HEIGHT_SCALE_FACTOR_MIN} and
342
+ * {@link TermuxPropertyConstants#IVALUE_TERMINAL_TOOLBAR_HEIGHT_SCALE_FACTOR_MAX},
343
+ * otherwise returns {@link TermuxPropertyConstants#DEFAULT_IVALUE_TERMINAL_TOOLBAR_HEIGHT_SCALE_FACTOR}.
330
344
*
331
345
* @param value The {@link String} value to convert.
332
346
* @return Returns the internal value for value.
@@ -478,6 +492,10 @@ public int getTerminalCursorBlinkRate() {
478
492
return (int ) getInternalPropertyValue (TermuxPropertyConstants .KEY_TERMINAL_CURSOR_BLINK_RATE , true );
479
493
}
480
494
495
+ public int getTerminalCursorStyle () {
496
+ return (int ) getInternalPropertyValue (TermuxPropertyConstants .KEY_TERMINAL_CURSOR_STYLE , true );
497
+ }
498
+
481
499
public int getTerminalTranscriptRows () {
482
500
return (int ) getInternalPropertyValue (TermuxPropertyConstants .KEY_TERMINAL_TRANSCRIPT_ROWS , true );
483
501
}
0 commit comments