1
0
Fork 0
forked from Miroirs/x49gp

--text-scale and --display-scale to scale then independently

This commit is contained in:
Gwenhael Le Moine 2024-11-10 12:45:06 +01:00
parent 2291e44205
commit c8f9ce5c2c
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
3 changed files with 109 additions and 102 deletions

View file

@ -28,7 +28,8 @@ void config_init( char* progname, int argc, char* argv[] )
opt.firmware = NULL; opt.firmware = NULL;
opt.model = MODEL_50G; opt.model = MODEL_50G;
opt.name = NULL; opt.name = NULL;
opt.scale = 1.0; opt.text_scale = 1;
opt.display_scale = 1;
#if defined( __linux__ ) #if defined( __linux__ )
opt.font = "urw gothic l"; opt.font = "urw gothic l";
@ -53,7 +54,8 @@ void config_init( char* progname, int argc, char* argv[] )
{"49gp", no_argument, NULL, 496}, {"49gp", no_argument, NULL, 496},
{"49gp-newrpl", no_argument, NULL, 497}, {"49gp-newrpl", no_argument, NULL, 497},
{"name", required_argument, NULL, 'n'}, {"name", required_argument, NULL, 'n'},
{"scale", required_argument, NULL, 's'}, {"text-scale", required_argument, NULL, 's'},
{"display-scale", required_argument, NULL, 'S'},
{"font", required_argument, NULL, 't'}, {"font", required_argument, NULL, 't'},
@ -77,7 +79,8 @@ void config_init( char* progname, int argc, char* argv[] )
" --49gp-newrpl show HP 49g+ faceplate with newRPL labels\n" " --49gp-newrpl show HP 49g+ faceplate with newRPL labels\n"
" -n --name[=<name>] set alternate UI name\n" " -n --name[=<name>] set alternate UI name\n"
" -t --font[=<fontname>] set alternate UI font\n" " -t --font[=<fontname>] set alternate UI font\n"
" -s --scale[=<X.x>] scale GUI by X.x\n" " -s --text-scale[=<X>] scale text by X\n"
" -S --display-scale[=<X>] scale LCD by X\n"
" -D --enable-debug[=<port>] enable the debugger interface\n" " -D --enable-debug[=<port>] enable the debugger interface\n"
" (default port: %u)\n" " (default port: %u)\n"
" -d --debug use along -D to also start the debugger immediately\n" " -d --debug use along -D to also start the debugger immediately\n"
@ -130,7 +133,10 @@ void config_init( char* progname, int argc, char* argv[] )
opt.name = strdup( optarg ); opt.name = strdup( optarg );
break; break;
case 's': case 's':
opt.scale = atof( optarg ); opt.text_scale = atoi( optarg );
break;
case 'S':
opt.display_scale = atoi( optarg );
break; break;
case 't': case 't':
opt.font = strdup( optarg ); opt.font = strdup( optarg );

View file

@ -26,7 +26,8 @@ struct options {
char* name; char* name;
char* font; char* font;
double scale; int display_scale;
int text_scale;
}; };
extern struct options opt; extern struct options opt;

View file

@ -24,10 +24,10 @@
#define NB_KEYS 51 #define NB_KEYS 51
#define FONT_SIZE_SYMBOL ( ( int )( 28 * opt.scale ) ) #define FONT_SIZE_SYMBOL ( ( int )( 28 * opt.text_scale ) )
#define FONT_SIZE_NUMBER ( ( int )( 20 * opt.scale ) ) #define FONT_SIZE_NUMBER ( ( int )( 20 * opt.text_scale ) )
#define FONT_SIZE_KEY ( ( int )( 12 * opt.scale ) ) #define FONT_SIZE_KEY ( ( int )( 12 * opt.text_scale ) )
#define FONT_SIZE_TINY ( ( int )( 10 * opt.scale ) ) #define FONT_SIZE_TINY ( ( int )( 10 * opt.text_scale ) )
#define TINY_TEXT_HEIGHT ( FONT_SIZE_TINY + 2 ) #define TINY_TEXT_HEIGHT ( FONT_SIZE_TINY + 2 )
#define TINY_TEXT_WIDTH ( TINY_TEXT_HEIGHT / 2 ) #define TINY_TEXT_WIDTH ( TINY_TEXT_HEIGHT / 2 )
@ -52,7 +52,7 @@
#define ANNUNCIATOR_HEIGHT 16 #define ANNUNCIATOR_HEIGHT 16
#define ANNUNCIATORS_HEIGHT ANNUNCIATOR_HEIGHT #define ANNUNCIATORS_HEIGHT ANNUNCIATOR_HEIGHT
#define LCD_PIXEL_SCALE ( ( int )( 2 * opt.scale ) ) #define LCD_PIXEL_SCALE ( ( int )( 2 * opt.display_scale ) )
#define LCD_WIDTH ( 131 * LCD_PIXEL_SCALE ) #define LCD_WIDTH ( 131 * LCD_PIXEL_SCALE )
#define LCD_HEIGHT ( 80 * LCD_PIXEL_SCALE ) #define LCD_HEIGHT ( 80 * LCD_PIXEL_SCALE )
@ -68,7 +68,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "A", .letter = "A",
.left = "Y=", .left = "Y=",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 1, .row = 1,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -79,7 +79,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "B", .letter = "B",
.left = "WIN", .left = "WIN",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 2, .row = 2,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -90,7 +90,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "C", .letter = "C",
.left = "GRAPH", .left = "GRAPH",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 3, .row = 3,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -101,7 +101,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "D", .letter = "D",
.left = "2D/3D", .left = "2D/3D",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 4, .row = 4,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -112,7 +112,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "E", .letter = "E",
.left = "TBLSET", .left = "TBLSET",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 5, .row = 5,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -123,7 +123,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "F", .letter = "F",
.left = "TABLE", .left = "TABLE",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 6, .row = 6,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -135,7 +135,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "G", .letter = "G",
.left = "FILES", .left = "FILES",
.right = "BEGIN", .right = "BEGIN",
.below = NULL, .below = "",
.column = 5, .column = 5,
.row = 7, .row = 7,
.columnbit = ( 1 << 5 ), .columnbit = ( 1 << 5 ),
@ -146,7 +146,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "H", .letter = "H",
.left = "CUSTOM", .left = "CUSTOM",
.right = "END", .right = "END",
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 5, .row = 5,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -157,7 +157,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "I", .letter = "I",
.left = "i", .left = "i",
.right = "I", .right = "I",
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 6, .row = 6,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -165,10 +165,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 6}, .eint = 6},
{.css_class = "arrow", {.css_class = "arrow",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = NULL, .left = "",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 1, .row = 1,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -179,7 +179,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "J", .letter = "J",
.left = "UPDIR", .left = "UPDIR",
.right = "COPY", .right = "COPY",
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 7, .row = 7,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -190,7 +190,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "K", .letter = "K",
.left = "RCL", .left = "RCL",
.right = "CUT", .right = "CUT",
.below = NULL, .below = "",
.column = 7, .column = 7,
.row = 1, .row = 1,
.columnbit = ( 1 << 7 ), .columnbit = ( 1 << 7 ),
@ -201,7 +201,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "L", .letter = "L",
.left = "PREV", .left = "PREV",
.right = "PASTE", .right = "PASTE",
.below = NULL, .below = "",
.column = 7, .column = 7,
.row = 2, .row = 2,
.columnbit = ( 1 << 7 ), .columnbit = ( 1 << 7 ),
@ -210,10 +210,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
{.css_class = "arrow", {.css_class = "arrow",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = NULL, .left = "",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 2, .row = 2,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -221,10 +221,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 2}, .eint = 2},
{.css_class = "arrow", {.css_class = "arrow",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = NULL, .left = "",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 3, .row = 3,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -232,10 +232,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 3}, .eint = 3},
{.css_class = "arrow", {.css_class = "arrow",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = NULL, .left = "",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 6, .column = 6,
.row = 4, .row = 4,
.columnbit = ( 1 << 6 ), .columnbit = ( 1 << 6 ),
@ -247,7 +247,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "M", .letter = "M",
.left = "CMD", .left = "CMD",
.right = "UNDO", .right = "UNDO",
.below = NULL, .below = "",
.column = 4, .column = 4,
.row = 1, .row = 1,
.columnbit = ( 1 << 4 ), .columnbit = ( 1 << 4 ),
@ -258,7 +258,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "N", .letter = "N",
.left = "PRG", .left = "PRG",
.right = "CHARS", .right = "CHARS",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 1, .row = 1,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -269,7 +269,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "O", .letter = "O",
.left = "MTRW", .left = "MTRW",
.right = "EQW", .right = "EQW",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 1, .row = 1,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -280,7 +280,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "P", .letter = "P",
.left = "MTH", .left = "MTH",
.right = "CAT", .right = "CAT",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 1, .row = 1,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -288,10 +288,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 1}, .eint = 1},
{.css_class = "function", {.css_class = "function",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = "DEL", .left = "DEL",
.right = "CLEAR", .right = "CLEAR",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 1, .row = 1,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -303,7 +303,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "Q", .letter = "Q",
.left = "𝑒<sup>x</sup>", .left = "𝑒<sup>x</sup>",
.right = "LN", .right = "LN",
.below = NULL, .below = "",
.column = 4, .column = 4,
.row = 2, .row = 2,
.columnbit = ( 1 << 4 ), .columnbit = ( 1 << 4 ),
@ -314,7 +314,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "R", .letter = "R",
.left = "𝓍<sup>2</sup>", .left = "𝓍<sup>2</sup>",
.right = "<sup>x</sup>√𝓎", .right = "<sup>x</sup>√𝓎",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 2, .row = 2,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -325,7 +325,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "S", .letter = "S",
.left = "ASIN", .left = "ASIN",
.right = "", .right = "",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 2, .row = 2,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -336,7 +336,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "T", .letter = "T",
.left = "ACOS", .left = "ACOS",
.right = "", .right = "",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 2, .row = 2,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -347,7 +347,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "U", .letter = "U",
.left = "ATAN", .left = "ATAN",
.right = "", .right = "",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 2, .row = 2,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -359,7 +359,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "V", .letter = "V",
.left = "10<sup>𝓍</sup>", .left = "10<sup>𝓍</sup>",
.right = "LOG", .right = "LOG",
.below = NULL, .below = "",
.column = 4, .column = 4,
.row = 3, .row = 3,
.columnbit = ( 1 << 4 ), .columnbit = ( 1 << 4 ),
@ -370,7 +370,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "W", .letter = "W",
.left = "", .left = "",
.right = "=", .right = "=",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 3, .row = 3,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -381,7 +381,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "X", .letter = "X",
.left = "", .left = "",
.right = "&gt;", .right = "&gt;",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 3, .row = 3,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -392,7 +392,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "Y", .letter = "Y",
.left = "", .left = "",
.right = ">", .right = ">",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 3, .row = 3,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -403,7 +403,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.letter = "Z", .letter = "Z",
.left = "ABS", .left = "ABS",
.right = "ARG", .right = "ARG",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 3, .row = 3,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -412,10 +412,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
{.css_class = "alpha", {.css_class = "alpha",
.label = "ALPHA", .label = "ALPHA",
.letter = NULL, .letter = "",
.left = "USER", .left = "USER",
.right = "ENTRY", .right = "ENTRY",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 0, .row = 0,
.columnbit = 0, .columnbit = 0,
@ -423,10 +423,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 4}, .eint = 4},
{.css_class = "core-number", {.css_class = "core-number",
.label = "7", .label = "7",
.letter = NULL, .letter = "",
.left = "S.SLV", .left = "S.SLV",
.right = "NUM.SLV", .right = "NUM.SLV",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 4, .row = 4,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -434,10 +434,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 4}, .eint = 4},
{.css_class = "core-number", {.css_class = "core-number",
.label = "8", .label = "8",
.letter = NULL, .letter = "",
.left = "EXP&amp;LN", .left = "EXP&amp;LN",
.right = "TRIG", .right = "TRIG",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 4, .row = 4,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -445,10 +445,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 4}, .eint = 4},
{.css_class = "core-number", {.css_class = "core-number",
.label = "9", .label = "9",
.letter = NULL, .letter = "",
.left = "FINANCE", .left = "FINANCE",
.right = "TIME", .right = "TIME",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 4, .row = 4,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -456,10 +456,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 4}, .eint = 4},
{.css_class = "core-number", {.css_class = "core-number",
.label = "×", .label = "×",
.letter = NULL, .letter = "",
.left = "[ ]", .left = "[ ]",
.right = "\" \"", .right = "\" \"",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 4, .row = 4,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -468,10 +468,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
{.css_class = "shift-left", {.css_class = "shift-left",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = NULL, .left = "",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 0, .row = 0,
.columnbit = 0, .columnbit = 0,
@ -479,10 +479,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 5}, .eint = 5},
{.css_class = "core-number", {.css_class = "core-number",
.label = "4", .label = "4",
.letter = NULL, .letter = "",
.left = "CALC", .left = "CALC",
.right = "ALG", .right = "ALG",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 5, .row = 5,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -490,10 +490,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 5}, .eint = 5},
{.css_class = "core-number", {.css_class = "core-number",
.label = "5", .label = "5",
.letter = NULL, .letter = "",
.left = "MATRICES", .left = "MATRICES",
.right = "STAT", .right = "STAT",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 5, .row = 5,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -501,10 +501,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 5}, .eint = 5},
{.css_class = "core-number", {.css_class = "core-number",
.label = "6", .label = "6",
.letter = NULL, .letter = "",
.left = "CONVERT", .left = "CONVERT",
.right = "UNITS", .right = "UNITS",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 5, .row = 5,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -512,10 +512,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 5}, .eint = 5},
{.css_class = "core-number", {.css_class = "core-number",
.label = "-", .label = "-",
.letter = NULL, .letter = "",
.left = "( )", .left = "( )",
.right = "_", .right = "_",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 5, .row = 5,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -524,10 +524,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
{.css_class = "shift-right", {.css_class = "shift-right",
.label = "", .label = "",
.letter = NULL, .letter = "",
.left = NULL, .left = "",
.right = NULL, .right = NULL,
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 0, .row = 0,
.columnbit = 0, .columnbit = 0,
@ -535,10 +535,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 6}, .eint = 6},
{.css_class = "core-number", {.css_class = "core-number",
.label = "1", .label = "1",
.letter = NULL, .letter = "",
.left = "ARITH", .left = "ARITH",
.right = "CMPLX", .right = "CMPLX",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 6, .row = 6,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -546,10 +546,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 6}, .eint = 6},
{.css_class = "core-number", {.css_class = "core-number",
.label = "2", .label = "2",
.letter = NULL, .letter = "",
.left = "DEF", .left = "DEF",
.right = "LIB", .right = "LIB",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 6, .row = 6,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -557,10 +557,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 6}, .eint = 6},
{.css_class = "core-number", {.css_class = "core-number",
.label = "3", .label = "3",
.letter = NULL, .letter = "",
.left = "#", .left = "#",
.right = "BASE", .right = "BASE",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 6, .row = 6,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -568,10 +568,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 6}, .eint = 6},
{.css_class = "core-number", {.css_class = "core-number",
.label = "+", .label = "+",
.letter = NULL, .letter = "",
.left = "{ }", .left = "{ }",
.right = "« »", .right = "« »",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 6, .row = 6,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -580,7 +580,7 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
{.css_class = "core", {.css_class = "core",
.label = "ON", .label = "ON",
.letter = NULL, .letter = "",
.left = "CONT", .left = "CONT",
.right = "OFF", .right = "OFF",
.below = "CANCEL", .below = "CANCEL",
@ -591,10 +591,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 0}, .eint = 0},
{.css_class = "core-number", {.css_class = "core-number",
.label = "0", .label = "0",
.letter = NULL, .letter = "",
.left = "", .left = "",
.right = "", .right = "",
.below = NULL, .below = "",
.column = 3, .column = 3,
.row = 7, .row = 7,
.columnbit = ( 1 << 3 ), .columnbit = ( 1 << 3 ),
@ -602,10 +602,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 7}, .eint = 7},
{.css_class = "core", {.css_class = "core",
.label = ".", .label = ".",
.letter = NULL, .letter = "",
.left = ": :", .left = ": :",
.right = "", .right = "",
.below = NULL, .below = "",
.column = 2, .column = 2,
.row = 7, .row = 7,
.columnbit = ( 1 << 2 ), .columnbit = ( 1 << 2 ),
@ -613,10 +613,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 7}, .eint = 7},
{.css_class = "core", {.css_class = "core",
.label = "SPC", .label = "SPC",
.letter = NULL, .letter = "",
.left = "𝚷", .left = "𝚷",
.right = ",", .right = ",",
.below = NULL, .below = "",
.column = 1, .column = 1,
.row = 7, .row = 7,
.columnbit = ( 1 << 1 ), .columnbit = ( 1 << 1 ),
@ -624,10 +624,10 @@ static x49gp_ui_key_t ui_keys[ NB_KEYS ] = {
.eint = 7}, .eint = 7},
{.css_class = "core", {.css_class = "core",
.label = "ENTER", .label = "ENTER",
.letter = NULL, .letter = "",
.left = "ANS", .left = "ANS",
.right = "→NUM", .right = "→NUM",
.below = NULL, .below = "",
.column = 0, .column = 0,
.row = 7, .row = 7,
.columnbit = ( 1 << 0 ), .columnbit = ( 1 << 0 ),
@ -1334,17 +1334,17 @@ static inline void _ui_load__newrplify_ui_keys()
{ {
// modify keys' labeling for newRPL // modify keys' labeling for newRPL
for ( int i = 0; i < 6; i++ ) for ( int i = 0; i < 6; i++ )
ui_keys[ i ].left = NULL; ui_keys[ i ].left = "";
for ( int i = 6; i < 9; i++ ) { for ( int i = 6; i < 9; i++ ) {
ui_keys[ i ].label = ""; ui_keys[ i ].label = "";
ui_keys[ i ].left = NULL; ui_keys[ i ].left = "";
ui_keys[ i ].right = NULL; ui_keys[ i ].right = NULL;
} }
for ( int i = 10; i < 13; i++ ) { for ( int i = 10; i < 13; i++ ) {
ui_keys[ i ].label = ""; ui_keys[ i ].label = "";
ui_keys[ i ].left = NULL; ui_keys[ i ].left = "";
ui_keys[ i ].right = NULL; ui_keys[ i ].right = NULL;
} }
@ -1363,33 +1363,33 @@ static inline void _ui_load__newrplify_ui_keys()
ui_keys[ 16 ].right = "PREV.M"; ui_keys[ 16 ].right = "PREV.M";
for ( int i = 17; i < 20; i++ ) { for ( int i = 17; i < 20; i++ ) {
ui_keys[ i ].left = NULL; ui_keys[ i ].left = "";
ui_keys[ i ].right = NULL; ui_keys[ i ].right = NULL;
} }
ui_keys[ 19 ].label = "MENU"; ui_keys[ 19 ].label = "MENU";
ui_keys[ 20 ].left = NULL; ui_keys[ 20 ].left = "";
for ( int i = 23; i < 26; i++ ) for ( int i = 23; i < 26; i++ )
ui_keys[ i ].right = NULL; ui_keys[ i ].right = NULL;
for ( int i = 31; i < 35; i++ ) for ( int i = 31; i < 35; i++ )
ui_keys[ i ].left = NULL; ui_keys[ i ].left = "";
ui_keys[ 33 ].right = NULL; ui_keys[ 33 ].right = NULL;
for ( int i = 37; i < 39; i++ ) { for ( int i = 37; i < 39; i++ ) {
ui_keys[ i ].left = NULL; ui_keys[ i ].left = "";
ui_keys[ i ].right = NULL; ui_keys[ i ].right = NULL;
} }
ui_keys[ 43 ].left = NULL; ui_keys[ 43 ].left = "";
ui_keys[ 46 ].left = NULL; ui_keys[ 46 ].left = "";
ui_keys[ 46 ].below = NULL; ui_keys[ 46 ].below = "";
ui_keys[ 50 ].left = NULL; ui_keys[ 50 ].left = "";
} }
static GtkWidget* _ui_load__create_annunciator_widget( x49gp_ui_t* ui, const char* label ) static GtkWidget* _ui_load__create_annunciator_widget( x49gp_ui_t* ui, const char* label )