diff --git a/src/x49gpng/s3c2410_lcd.c b/src/x49gpng/s3c2410_lcd.c index 92b9ac1..93deac5 100644 --- a/src/x49gpng/s3c2410_lcd.c +++ b/src/x49gpng/s3c2410_lcd.c @@ -292,46 +292,41 @@ void x49gp_draw_rectangle( GdkPixmap* target, int x, int y, int w, int h, GdkCol cairo_destroy( cr ); } +void x49gp_draw_surface( GdkPixmap* target, cairo_surface_t* surface, int x, int y, int w, int h, GdkColor* color ) +{ + cairo_t* cr = gdk_cairo_create( target ); + + cairo_set_source_rgb( cr, color->red / 65535.0, color->green / 65535.0, color->blue / 65535.0 ); + cairo_mask_surface( cr, surface, x, y ); + + cairo_destroy( cr ); +} + void x49gp_lcd_update( x49gp_t* x49gp ) { x49gp_ui_t* ui = x49gp->ui; s3c2410_lcd_t* lcd = x49gp->s3c2410_lcd; - // cairo_t* cr; - - gdk_draw_drawable( ui->lcd_pixmap, gtk_widget_get_style( ui->window )->bg_gc[ 0 ], ui->bg_pixmap, ui->lcd_x_offset, ui->lcd_y_offset, 0, - 0, ui->lcd_width, ui->lcd_height ); if ( lcd->lcdcon1 & 1 ) { - int color; + GdkColor color; - color = x49gp_get_pixel_color( lcd, 131, 1 ); - gdk_gc_set_rgb_fg_color( ui->ann_left_gc, &( ui->colors[ UI_COLOR_GRAYSCALE_0 + color ] ) ); - gdk_draw_rectangle( ui->lcd_pixmap, ui->ann_left_gc, true, 11, 0, 15, 12 ); + color = ui->colors[ UI_COLOR_GRAYSCALE_0 + x49gp_get_pixel_color( lcd, 131, 1 ) ]; + x49gp_draw_surface( ui->lcd_pixmap, ui->ann_left_surface, 11, 0, 15, 12, &color ); - /* cr = gdk_cairo_create( ui->ann_left ); */ - /* gdk_cairo_set_source_pixbuf( cr, ui->lcd_pixmap, 11, 0 ); */ - /* cairo_paint( cr ); */ - /* cairo_destroy( cr ); */ + color = ui->colors[ UI_COLOR_GRAYSCALE_0 + x49gp_get_pixel_color( lcd, 131, 2 ) ]; + x49gp_draw_surface( ui->lcd_pixmap, ui->ann_right_surface, 56, 0, 15, 12, &color ); - color = x49gp_get_pixel_color( lcd, 131, 2 ); - gdk_gc_set_rgb_fg_color( ui->ann_right_gc, &( ui->colors[ UI_COLOR_GRAYSCALE_0 + color ] ) ); - gdk_draw_rectangle( ui->lcd_pixmap, ui->ann_right_gc, true, 56, 0, 15, 12 ); + color = ui->colors[ UI_COLOR_GRAYSCALE_0 + x49gp_get_pixel_color( lcd, 131, 3 ) ]; + x49gp_draw_surface( ui->lcd_pixmap, ui->ann_alpha_surface, 101, 0, 15, 12, &color ); - color = x49gp_get_pixel_color( lcd, 131, 3 ); - gdk_gc_set_rgb_fg_color( ui->ann_alpha_gc, &( ui->colors[ UI_COLOR_GRAYSCALE_0 + color ] ) ); - gdk_draw_rectangle( ui->lcd_pixmap, ui->ann_alpha_gc, true, 101, 0, 15, 12 ); + color = ui->colors[ UI_COLOR_GRAYSCALE_0 + x49gp_get_pixel_color( lcd, 131, 4 ) ]; + x49gp_draw_surface( ui->lcd_pixmap, ui->ann_battery_surface, 146, 0, 15, 12, &color ); - color = x49gp_get_pixel_color( lcd, 131, 4 ); - gdk_gc_set_rgb_fg_color( ui->ann_battery_gc, &( ui->colors[ UI_COLOR_GRAYSCALE_0 + color ] ) ); - gdk_draw_rectangle( ui->lcd_pixmap, ui->ann_battery_gc, true, 146, 0, 15, 12 ); + color = ui->colors[ UI_COLOR_GRAYSCALE_0 + x49gp_get_pixel_color( lcd, 131, 5 ) ]; + x49gp_draw_surface( ui->lcd_pixmap, ui->ann_busy_surface, 191, 0, 15, 12, &color ); - color = x49gp_get_pixel_color( lcd, 131, 5 ); - gdk_gc_set_rgb_fg_color( ui->ann_busy_gc, &( ui->colors[ UI_COLOR_GRAYSCALE_0 + color ] ) ); - gdk_draw_rectangle( ui->lcd_pixmap, ui->ann_busy_gc, true, 191, 0, 15, 12 ); - - color = x49gp_get_pixel_color( lcd, 131, 0 ); - gdk_gc_set_rgb_fg_color( ui->ann_io_gc, &( ui->colors[ UI_COLOR_GRAYSCALE_0 + color ] ) ); - gdk_draw_rectangle( ui->lcd_pixmap, ui->ann_io_gc, true, 236, 0, 15, 12 ); + color = ui->colors[ UI_COLOR_GRAYSCALE_0 + x49gp_get_pixel_color( lcd, 131, 0 ) ]; + x49gp_draw_surface( ui->lcd_pixmap, ui->ann_io_surface, 236, 0, 15, 12, &color ); for ( int y = 0; y < ( ( ui->lcd_height - ui->lcd_annunciators_height ) / LCD_PIXEL_SCALE ); y++ ) for ( int x = 0; x < ( ui->lcd_width / LCD_PIXEL_SCALE ); x++ ) diff --git a/src/x49gpng/ui.c b/src/x49gpng/ui.c index 249e124..6830a01 100644 --- a/src/x49gpng/ui.c +++ b/src/x49gpng/ui.c @@ -178,7 +178,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 5 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "MODE", .letter = "H", .left = "CUSTOM", @@ -199,7 +199,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "TOOL", .letter = "I", .left = "i", @@ -220,7 +220,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "V\\kern-1 AR", .letter = "J", .left = "UPDIR", @@ -241,7 +241,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "STO \\triangleright", .letter = "K", .left = "RCL", @@ -262,7 +262,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "NXT", .letter = "L", .left = "PREV", @@ -283,7 +283,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = NULL, .letter = NULL, .left = NULL, @@ -304,7 +304,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = NULL, .letter = NULL, .left = NULL, @@ -325,7 +325,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = NULL, .letter = NULL, .left = NULL, @@ -346,7 +346,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = NULL, .letter = NULL, .left = NULL, @@ -367,7 +367,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "HIST", .letter = "M", .left = "CMD", @@ -388,7 +388,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EV\\kern-1 AL", .letter = "N", .left = "PRG", @@ -409,7 +409,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\tick", .letter = "O", .left = "MTRW", @@ -430,7 +430,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "S\\kern-1 Y\\kern-1 M\\kern-1 B", .letter = "P", .left = "MTH", @@ -451,7 +451,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\arrowleftdblfull", .letter = NULL, .left = "DEL", @@ -472,7 +472,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "Y\\super x\\/super", .letter = "Q", .left = "\\math_e\\xsuperior", @@ -493,7 +493,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\radical\\overscore\\kern-7 X", .letter = "R", .left = "\\math_x\\twosuperior", @@ -514,7 +514,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SIN", .letter = "S", .left = "ASIN", @@ -535,7 +535,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "COS", .letter = "T", .left = "ACOS", @@ -556,7 +556,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "TAN", .letter = "U", .left = "ATAN", @@ -577,7 +577,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EEX", .letter = "V", .left = "10\\xsuperior", @@ -598,7 +598,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+\\divisionslash\\minus", .letter = "W", .left = "\\math_notequal", @@ -619,7 +619,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "X", .letter = "X", .left = "\\math_lessequal", @@ -640,7 +640,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "1/X", .letter = "Y", .left = "\\math_greaterequal", @@ -661,7 +661,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\divide", .letter = "Z", .left = "ABS", @@ -682,7 +682,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ALPHA", .letter = NULL, .left = "USER", @@ -703,7 +703,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 4, - .bg_color = UI_COLOR_YELLOW}, + .bg_color = UI_COLOR_YELLOW }, {.label = "7", .letter = NULL, .left = "S.SLV", @@ -724,7 +724,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "8", .letter = NULL, .left = "EXP&LN", @@ -745,7 +745,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "9", .letter = NULL, .left = "FINANCE", @@ -766,7 +766,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\multiply", .letter = NULL, .left = "[ ]", @@ -787,7 +787,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowleft", .letter = NULL, .left = NULL, @@ -808,7 +808,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 5, - .bg_color = UI_COLOR_WHITE}, + .bg_color = UI_COLOR_WHITE }, {.label = "4", .letter = NULL, .left = "CALC", @@ -829,7 +829,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "5", .letter = NULL, .left = "MATRICES", @@ -850,7 +850,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "6", .letter = NULL, .left = "CONVERT", @@ -871,7 +871,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\minus", .letter = NULL, .left = "( )", @@ -892,7 +892,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowright", .letter = NULL, .left = NULL, @@ -913,7 +913,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 6, - .bg_color = UI_COLOR_ORANGE}, + .bg_color = UI_COLOR_ORANGE }, {.label = "1", .letter = NULL, .left = "ARITH", @@ -934,7 +934,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "2", .letter = NULL, .left = "DEF", @@ -955,7 +955,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "3", .letter = NULL, .left = "\\math_numbersign", @@ -976,7 +976,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+", .letter = NULL, .left = "{ }", @@ -997,7 +997,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ON", .letter = NULL, .left = "CONT", @@ -1018,7 +1018,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 0, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "0", .letter = NULL, .left = "\\math_infinity", @@ -1039,7 +1039,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\bullet", .letter = NULL, .left = ": :", @@ -1060,7 +1060,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SPC", .letter = NULL, .left = "\\math_pi", @@ -1081,7 +1081,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ENTER", .letter = NULL, .left = "ANS", @@ -1102,7 +1102,7 @@ static const x49gp_ui_key_t x49gp_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, }; #define X49GP_UI_NR_KEYS ( sizeof( x49gp_ui_keys ) / sizeof( x49gp_ui_keys[ 0 ] ) ) @@ -1253,7 +1253,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 5 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "H", .left = NULL, @@ -1274,7 +1274,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "I", .left = NULL, @@ -1295,7 +1295,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "J", .left = NULL, @@ -1316,7 +1316,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "K", .left = NULL, @@ -1337,7 +1337,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "L", .left = NULL, @@ -1358,7 +1358,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "", .left = "UPDIR", @@ -1379,7 +1379,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "", .letter = "", .left = "BEG COPY", @@ -1400,7 +1400,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "", .letter = "", .left = "CUT", @@ -1421,7 +1421,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "", .letter = "", .left = "END PASTE", @@ -1442,7 +1442,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "S\\kern-1 T\\kern-1 O\\kern-1\\triangleright", .letter = "M", .left = "RCL", @@ -1463,7 +1463,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EV\\kern-1 AL", .letter = "N", .left = NULL, @@ -1484,7 +1484,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\tick", .letter = "O", .left = NULL, @@ -1505,7 +1505,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "M\\kern-1 E\\kern-1 N\\kern-1 U", .letter = "P", .left = NULL, @@ -1526,7 +1526,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\arrowleftdblfull", .letter = NULL, .left = NULL, @@ -1547,7 +1547,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "Y\\super x\\/super", .letter = "Q", .left = "\\math_e\\xsuperior", @@ -1568,7 +1568,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\radical\\overscore\\kern-7 X", .letter = "R", .left = "\\math_x\\twosuperior", @@ -1589,7 +1589,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SIN", .letter = "S", .left = "ASIN", @@ -1610,7 +1610,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "COS", .letter = "T", .left = "ACOS", @@ -1631,7 +1631,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "TAN", .letter = "U", .left = "ATAN", @@ -1652,7 +1652,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EEX", .letter = "V", .left = "10\\xsuperior", @@ -1673,7 +1673,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+\\divisionslash\\minus", .letter = "W", .left = "\\math_notequal", @@ -1694,7 +1694,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "X", .letter = "X", .left = "\\math_lessequal", @@ -1715,7 +1715,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "1/X", .letter = "Y", .left = "\\math_greaterequal", @@ -1736,7 +1736,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\divide", .letter = "Z", .left = "ABS", @@ -1757,7 +1757,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ALPHA", .letter = "", .left = "", @@ -1778,7 +1778,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 4, - .bg_color = UI_COLOR_YELLOW}, + .bg_color = UI_COLOR_YELLOW }, {.label = "7", .letter = "", .left = "", @@ -1799,7 +1799,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "8", .letter = NULL, .left = NULL, @@ -1820,7 +1820,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "9", .letter = "", .left = "", @@ -1841,7 +1841,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\multiply", .letter = NULL, .left = "[ ]", @@ -1862,7 +1862,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowleft", .letter = NULL, .left = NULL, @@ -1883,7 +1883,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 5, - .bg_color = UI_COLOR_WHITE}, + .bg_color = UI_COLOR_WHITE }, {.label = "4", .letter = NULL, .left = NULL, @@ -1904,7 +1904,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "5", .letter = NULL, .left = NULL, @@ -1925,7 +1925,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "6", .letter = NULL, .left = "CONVERT", @@ -1946,7 +1946,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\minus", .letter = NULL, .left = "( )", @@ -1967,7 +1967,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowright", .letter = NULL, .left = NULL, @@ -1988,7 +1988,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 6, - .bg_color = UI_COLOR_ORANGE}, + .bg_color = UI_COLOR_ORANGE }, {.label = "1", .letter = "", .left = "ARITH", @@ -2009,7 +2009,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "2", .letter = "", .left = "", @@ -2030,7 +2030,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "3", .letter = NULL, .left = "\\math_numbersign", @@ -2051,7 +2051,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+", .letter = NULL, .left = "{ }", @@ -2072,7 +2072,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ON", .letter = NULL, .left = NULL, @@ -2093,7 +2093,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 0, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "0", .letter = NULL, .left = "\\math_infinity", @@ -2114,7 +2114,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\bullet", .letter = NULL, .left = ": :", @@ -2135,7 +2135,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SPC", .letter = NULL, .left = "\\math_pi", @@ -2156,7 +2156,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ENTER", .letter = NULL, .left = NULL, @@ -2177,7 +2177,7 @@ static const x49gp_ui_key_t x49gp_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, }; #define X49GP_NEWRPL_UI_NR_KEYS ( sizeof( x49gp_newrpl_ui_keys ) / sizeof( x49gp_newrpl_ui_keys[ 0 ] ) ) @@ -2328,7 +2328,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 5 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "MODE", .letter = "H", .left = "CUSTOM", @@ -2349,7 +2349,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "TOOL", .letter = "I", .left = "i", @@ -2370,7 +2370,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "V\\kern-1 AR", .letter = "J", .left = "UPDIR", @@ -2391,7 +2391,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "STO \\triangleright", .letter = "K", .left = "RCL", @@ -2412,7 +2412,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "NXT", .letter = "L", .left = "PREV", @@ -2433,7 +2433,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = NULL, .letter = NULL, .left = NULL, @@ -2454,7 +2454,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = NULL, .letter = NULL, .left = NULL, @@ -2475,7 +2475,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = NULL, .letter = NULL, .left = NULL, @@ -2496,7 +2496,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = NULL, .letter = NULL, .left = NULL, @@ -2517,7 +2517,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "HIST", .letter = "M", .left = "CMD", @@ -2538,7 +2538,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EV\\kern-1 AL", .letter = "N", .left = "PRG", @@ -2559,7 +2559,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\tick", .letter = "O", .left = "MTRW", @@ -2580,7 +2580,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "S\\kern-1 Y\\kern-1 M\\kern-1 B", .letter = "P", .left = "MTH", @@ -2601,7 +2601,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\arrowleftdblfull", .letter = NULL, .left = "DEL", @@ -2622,7 +2622,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "Y\\super x\\/super", .letter = "Q", .left = "\\math_e\\xsuperior", @@ -2643,7 +2643,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\radical\\overscore\\kern-7 X", .letter = "R", .left = "\\math_x\\twosuperior", @@ -2664,7 +2664,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SIN", .letter = "S", .left = "ASIN", @@ -2685,7 +2685,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "COS", .letter = "T", .left = "ACOS", @@ -2706,7 +2706,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "TAN", .letter = "U", .left = "ATAN", @@ -2727,7 +2727,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EEX", .letter = "V", .left = "10\\xsuperior", @@ -2748,7 +2748,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+\\divisionslash\\minus", .letter = "W", .left = "\\math_notequal", @@ -2769,7 +2769,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "X", .letter = "X", .left = "\\math_lessequal", @@ -2790,7 +2790,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "1/X", .letter = "Y", .left = "\\math_greaterequal", @@ -2811,7 +2811,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\divide", .letter = "Z", .left = "ABS", @@ -2832,7 +2832,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ALPHA", .letter = NULL, .left = "USER", @@ -2853,7 +2853,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 4, - .bg_color = UI_COLOR_YELLOW}, + .bg_color = UI_COLOR_YELLOW }, {.label = "7", .letter = NULL, .left = "S.SLV", @@ -2874,7 +2874,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "8", .letter = NULL, .left = "EXP&LN", @@ -2895,7 +2895,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "9", .letter = NULL, .left = "FINANCE", @@ -2916,7 +2916,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\multiply", .letter = NULL, .left = "[ ]", @@ -2937,7 +2937,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowleft", .letter = NULL, .left = NULL, @@ -2958,7 +2958,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 5, - .bg_color = UI_COLOR_WHITE}, + .bg_color = UI_COLOR_WHITE }, {.label = "4", .letter = NULL, .left = "CALC", @@ -2979,7 +2979,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "5", .letter = NULL, .left = "MATRICES", @@ -3000,7 +3000,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "6", .letter = NULL, .left = "CONVERT", @@ -3021,7 +3021,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\minus", .letter = NULL, .left = "( )", @@ -3042,7 +3042,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowright", .letter = NULL, .left = NULL, @@ -3063,7 +3063,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 6, - .bg_color = UI_COLOR_ORANGE}, + .bg_color = UI_COLOR_ORANGE }, {.label = "1", .letter = NULL, .left = "ARITH", @@ -3084,7 +3084,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "2", .letter = NULL, .left = "DEF", @@ -3105,7 +3105,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "3", .letter = NULL, .left = "\\math_numbersign", @@ -3126,7 +3126,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+", .letter = NULL, .left = "{ }", @@ -3147,7 +3147,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ON", .letter = NULL, .left = "CONT", @@ -3168,7 +3168,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 0, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "0", .letter = NULL, .left = "\\math_infinity", @@ -3189,7 +3189,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\bullet", .letter = NULL, .left = ": :", @@ -3210,7 +3210,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SPC", .letter = NULL, .left = "\\math_pi", @@ -3231,7 +3231,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ENTER", .letter = NULL, .left = "ANS", @@ -3252,7 +3252,7 @@ static const x49gp_ui_key_t x50g_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, }; #define X50G_UI_NR_KEYS ( sizeof( x50g_ui_keys ) / sizeof( x50g_ui_keys[ 0 ] ) ) @@ -3403,7 +3403,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 5 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "H", .left = NULL, @@ -3424,7 +3424,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "I", .left = NULL, @@ -3445,7 +3445,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "J", .left = NULL, @@ -3466,7 +3466,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "K", .left = NULL, @@ -3487,7 +3487,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "L", .left = NULL, @@ -3508,7 +3508,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 7 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "", .letter = "", .left = "UPDIR", @@ -3529,7 +3529,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "", .letter = "", .left = "BEG COPY", @@ -3550,7 +3550,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "", .letter = "", .left = "CUT", @@ -3571,7 +3571,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "", .letter = "", .left = "END PASTE", @@ -3592,7 +3592,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 6 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_SILVER}, + .bg_color = UI_COLOR_SILVER }, {.label = "S\\kern-1 T\\kern-1 O\\kern-1\\triangleright", .letter = "M", .left = "RCL", @@ -3613,7 +3613,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EV\\kern-1 AL", .letter = "N", .left = NULL, @@ -3634,7 +3634,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\tick", .letter = "O", .left = NULL, @@ -3655,7 +3655,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "M\\kern-1 E\\kern-1 N\\kern-1 U", .letter = "P", .left = NULL, @@ -3676,7 +3676,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\arrowleftdblfull", .letter = NULL, .left = NULL, @@ -3697,7 +3697,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 1 ), .eint = 1, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "Y\\super x\\/super", .letter = "Q", .left = "\\math_e\\xsuperior", @@ -3718,7 +3718,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\radical\\overscore\\kern-7 X", .letter = "R", .left = "\\math_x\\twosuperior", @@ -3739,7 +3739,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SIN", .letter = "S", .left = "ASIN", @@ -3760,7 +3760,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "COS", .letter = "T", .left = "ACOS", @@ -3781,7 +3781,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "TAN", .letter = "U", .left = "ATAN", @@ -3802,7 +3802,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 2 ), .eint = 2, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "EEX", .letter = "V", .left = "10\\xsuperior", @@ -3823,7 +3823,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 4 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+\\divisionslash\\minus", .letter = "W", .left = "\\math_notequal", @@ -3844,7 +3844,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "X", .letter = "X", .left = "\\math_lessequal", @@ -3865,7 +3865,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "1/X", .letter = "Y", .left = "\\math_greaterequal", @@ -3886,7 +3886,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\divide", .letter = "Z", .left = "ABS", @@ -3907,7 +3907,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 3 ), .eint = 3, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ALPHA", .letter = "", .left = "", @@ -3928,7 +3928,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 4, - .bg_color = UI_COLOR_YELLOW}, + .bg_color = UI_COLOR_YELLOW }, {.label = "7", .letter = "", .left = "", @@ -3949,7 +3949,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "8", .letter = NULL, .left = NULL, @@ -3970,7 +3970,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "9", .letter = "", .left = "", @@ -3991,7 +3991,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\multiply", .letter = NULL, .left = "[ ]", @@ -4012,7 +4012,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 4 ), .eint = 4, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowleft", .letter = NULL, .left = NULL, @@ -4033,7 +4033,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 5, - .bg_color = UI_COLOR_WHITE}, + .bg_color = UI_COLOR_WHITE }, {.label = "4", .letter = NULL, .left = NULL, @@ -4054,7 +4054,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "5", .letter = NULL, .left = NULL, @@ -4075,7 +4075,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "6", .letter = NULL, .left = "CONVERT", @@ -4096,7 +4096,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\minus", .letter = NULL, .left = "( )", @@ -4117,7 +4117,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 5 ), .eint = 5, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\uparrowright", .letter = NULL, .left = NULL, @@ -4138,7 +4138,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 6, - .bg_color = UI_COLOR_ORANGE}, + .bg_color = UI_COLOR_ORANGE }, {.label = "1", .letter = "", .left = "ARITH", @@ -4159,7 +4159,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "2", .letter = "", .left = "", @@ -4180,7 +4180,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "3", .letter = NULL, .left = "\\math_numbersign", @@ -4201,7 +4201,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "+", .letter = NULL, .left = "{ }", @@ -4222,7 +4222,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 6 ), .eint = 6, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ON", .letter = NULL, .left = NULL, @@ -4243,7 +4243,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = 0, .rowbit = 0, .eint = 0, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "0", .letter = NULL, .left = "\\math_infinity", @@ -4264,7 +4264,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 3 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "\\bullet", .letter = NULL, .left = ": :", @@ -4285,7 +4285,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 2 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "SPC", .letter = NULL, .left = "\\math_pi", @@ -4306,7 +4306,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 1 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, {.label = "ENTER", .letter = NULL, .left = NULL, @@ -4327,7 +4327,7 @@ static const x49gp_ui_key_t x50g_newrpl_ui_keys[] = { .columnbit = ( 1 << 0 ), .rowbit = ( 1 << 7 ), .eint = 7, - .bg_color = UI_COLOR_BLACK}, + .bg_color = UI_COLOR_BLACK }, }; #define X50G_NEWRPL_UI_NR_KEYS ( sizeof( x50g_newrpl_ui_keys ) / sizeof( x50g_newrpl_ui_keys[ 0 ] ) ) @@ -5666,9 +5666,6 @@ static void x49gp_button_realize( GtkWidget* widget, gpointer user_data ) button->pixmap = gdk_pixmap_new( gtk_widget_get_style( widget )->bg_pixmap[ 0 ], w, h, -1 ); - gdk_draw_drawable( button->pixmap, gtk_widget_get_style( widget )->black_gc, gtk_widget_get_style( widget )->bg_pixmap[ 0 ], xoffset, - yoffset, 0, 0, button->key->width, button->key->height ); - xoffset += 2; yoffset += 2; w -= 4; @@ -5689,7 +5686,8 @@ static void x49gp_button_realize( GtkWidget* widget, gpointer user_data ) cairo_stroke( cr ); #endif - cairo_set_source_rgb( cr, ui->colors[key->bg_color].red / 65535.0, ui->colors[key->bg_color].green / 65535.0, ui->colors[key->bg_color].blue / 65535.0 ); + cairo_set_source_rgb( cr, ui->colors[ key->bg_color ].red / 65535.0, ui->colors[ key->bg_color ].green / 65535.0, + ui->colors[ key->bg_color ].blue / 65535.0 ); cairo_set_line_width( cr, 1.0 ); cairo_move_to( cr, xoffset, yoffset ); cairo_line_to( cr, xoffset + w - 1, yoffset ); @@ -5762,71 +5760,21 @@ static int x49gp_lcd_configure_event( GtkWidget* widget, GdkEventConfigure* even if ( NULL != ui->lcd_pixmap ) return false; - ui->ann_left = - gdk_bitmap_create_from_data( gtk_widget_get_window( ui->lcd_canvas ), ( char* )ann_left_bits, ann_left_width, ann_left_height ); - ui->ann_right = - gdk_bitmap_create_from_data( gtk_widget_get_window( ui->lcd_canvas ), ( char* )ann_right_bits, ann_right_width, ann_right_height ); - ui->ann_alpha = - gdk_bitmap_create_from_data( gtk_widget_get_window( ui->lcd_canvas ), ( char* )ann_alpha_bits, ann_alpha_width, ann_alpha_height ); - ui->ann_battery = gdk_bitmap_create_from_data( gtk_widget_get_window( ui->lcd_canvas ), ( char* )ann_battery_bits, ann_battery_width, - ann_battery_height ); - ui->ann_busy = - gdk_bitmap_create_from_data( gtk_widget_get_window( ui->lcd_canvas ), ( char* )ann_busy_bits, ann_busy_width, ann_busy_height ); - ui->ann_io = gdk_bitmap_create_from_data( gtk_widget_get_window( ui->lcd_canvas ), ( char* )ann_io_bits, ann_io_width, ann_io_height ); - - ui->ann_left_gc = gdk_gc_new( gtk_widget_get_window( ui->lcd_canvas ) ); - gdk_gc_copy( ui->ann_left_gc, gtk_widget_get_style( widget )->black_gc ); - gdk_gc_set_ts_origin( ui->ann_left_gc, 11, 0 ); - gdk_gc_set_stipple( ui->ann_left_gc, ui->ann_left ); - gdk_gc_set_fill( ui->ann_left_gc, GDK_STIPPLED ); - - ui->ann_right_gc = gdk_gc_new( gtk_widget_get_window( ui->lcd_canvas ) ); - gdk_gc_copy( ui->ann_right_gc, gtk_widget_get_style( widget )->black_gc ); - gdk_gc_set_ts_origin( ui->ann_right_gc, 56, 0 ); - gdk_gc_set_stipple( ui->ann_right_gc, ui->ann_right ); - gdk_gc_set_fill( ui->ann_right_gc, GDK_STIPPLED ); - - ui->ann_alpha_gc = gdk_gc_new( gtk_widget_get_window( ui->lcd_canvas ) ); - gdk_gc_copy( ui->ann_alpha_gc, gtk_widget_get_style( widget )->black_gc ); - gdk_gc_set_ts_origin( ui->ann_alpha_gc, 101, 0 ); - gdk_gc_set_stipple( ui->ann_alpha_gc, ui->ann_alpha ); - gdk_gc_set_fill( ui->ann_alpha_gc, GDK_STIPPLED ); - - ui->ann_battery_gc = gdk_gc_new( gtk_widget_get_window( ui->lcd_canvas ) ); - gdk_gc_copy( ui->ann_battery_gc, gtk_widget_get_style( widget )->black_gc ); - gdk_gc_set_ts_origin( ui->ann_battery_gc, 146, 0 ); - gdk_gc_set_stipple( ui->ann_battery_gc, ui->ann_battery ); - gdk_gc_set_fill( ui->ann_battery_gc, GDK_STIPPLED ); - - ui->ann_busy_gc = gdk_gc_new( gtk_widget_get_window( ui->lcd_canvas ) ); - gdk_gc_copy( ui->ann_busy_gc, gtk_widget_get_style( widget )->black_gc ); - gdk_gc_set_ts_origin( ui->ann_busy_gc, 191, 0 ); - gdk_gc_set_stipple( ui->ann_busy_gc, ui->ann_busy ); - gdk_gc_set_fill( ui->ann_busy_gc, GDK_STIPPLED ); - - ui->ann_io_gc = gdk_gc_new( gtk_widget_get_window( ui->lcd_canvas ) ); - gdk_gc_copy( ui->ann_io_gc, gtk_widget_get_style( widget )->black_gc ); - gdk_gc_set_ts_origin( ui->ann_io_gc, 236, 0 ); - gdk_gc_set_stipple( ui->ann_io_gc, ui->ann_io ); - gdk_gc_set_fill( ui->ann_io_gc, GDK_STIPPLED ); + ui->ann_left_surface = cairo_image_surface_create_for_data( ann_left_bits, CAIRO_FORMAT_A1, ann_left_width, ann_left_height, + cairo_format_stride_for_width( CAIRO_FORMAT_A1, ann_left_width ) ); + ui->ann_right_surface = cairo_image_surface_create_for_data( ann_right_bits, CAIRO_FORMAT_A1, ann_right_width, ann_right_height, + cairo_format_stride_for_width( CAIRO_FORMAT_A1, ann_right_width ) ); + ui->ann_alpha_surface = cairo_image_surface_create_for_data( ann_alpha_bits, CAIRO_FORMAT_A1, ann_alpha_width, ann_alpha_height, + cairo_format_stride_for_width( CAIRO_FORMAT_A1, ann_alpha_width ) ); + ui->ann_battery_surface = cairo_image_surface_create_for_data( ann_battery_bits, CAIRO_FORMAT_A1, ann_battery_width, ann_battery_height, + cairo_format_stride_for_width( CAIRO_FORMAT_A1, ann_battery_width ) ); + ui->ann_busy_surface = cairo_image_surface_create_for_data( ann_busy_bits, CAIRO_FORMAT_A1, ann_busy_width, ann_busy_height, + cairo_format_stride_for_width( CAIRO_FORMAT_A1, ann_busy_width ) ); + ui->ann_io_surface = cairo_image_surface_create_for_data( ann_io_bits, CAIRO_FORMAT_A1, ann_io_width, ann_io_height, + cairo_format_stride_for_width( CAIRO_FORMAT_A1, ann_io_width ) ); ui->lcd_pixmap = gdk_pixmap_new( gtk_widget_get_window( ui->lcd_canvas ), ui->lcd_width, ui->lcd_height, -1 ); -#if DEBUG_LAYOUT /* Debug Symbols on LCD screen ;) */ - { - cairo_t* cr; - - cr = gdk_cairo_create( ui->bg_pixmap ); - cairo_set_line_cap( cr, CAIRO_LINE_CAP_BUTT ); - cairo_set_line_join( cr, CAIRO_LINE_JOIN_MITER ); - - x49gp_ui_draw_text( cr, >k_widget_get_style( widget )->black, opt.font, 100.0, 1.0, ui->lcd_x_offset + 10, ui->lcd_y_offset + 160, - 1, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, "\\arrowleftdblfull" ); - - cairo_destroy( cr ); - } -#endif - gdk_draw_drawable( ui->lcd_pixmap, gtk_widget_get_style( widget )->black_gc, ui->bg_pixmap, ui->lcd_x_offset, ui->lcd_y_offset, 0, 0, ui->lcd_width, ui->lcd_height ); @@ -6041,14 +5989,14 @@ static int gui_load( x49gp_module_t* module, GKeyFile* keyfile ) gdk_bitmap_create_from_data( NULL, ( char* )button_round_bits, button_round_width, button_round_height ); /* create all colors */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_BLACK ], 0x00, 0x00, 0x00 ); /* #000000 */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_WHITE ], 0xff, 0xff, 0xff ); /* #ffffff */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_YELLOW ], 0xfa, 0xe8, 0x2c ); /* #fae82c */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_RED ], 0x8e, 0x25, 0x18 ); /* #8e2518 */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_GREEN ], 0x14, 0x4d, 0x49 ); /* #144d49 */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_SILVER ], 0xe0, 0xe0, 0xe0 ); /* #e0e0e0 */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_ORANGE ], 0xc0, 0x6e, 0x60 ); /* #c06e60 */ - x49gp_ui_color_init( &ui->colors[ UI_COLOR_BLUE ], 0x40, 0x60, 0xa4 ); /* #4060a4 */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_BLACK ], 0x00, 0x00, 0x00 ); /* #000000 */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_WHITE ], 0xff, 0xff, 0xff ); /* #ffffff */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_YELLOW ], 0xfa, 0xe8, 0x2c ); /* #fae82c */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_RED ], 0x8e, 0x25, 0x18 ); /* #8e2518 */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_GREEN ], 0x14, 0x4d, 0x49 ); /* #144d49 */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_SILVER ], 0xe0, 0xe0, 0xe0 ); /* #e0e0e0 */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_ORANGE ], 0xc0, 0x6e, 0x60 ); /* #c06e60 */ + x49gp_ui_color_init( &ui->colors[ UI_COLOR_BLUE ], 0x40, 0x60, 0xa4 ); /* #4060a4 */ x49gp_ui_color_init( &ui->colors[ UI_COLOR_GRAYSCALE_0 ], 0xab, 0xd2, 0xb4 ); /* #abd2b4 */ x49gp_ui_color_init( &ui->colors[ UI_COLOR_GRAYSCALE_1 ], 0xa0, 0xc4, 0xa8 ); /* #a0c4a8 */ x49gp_ui_color_init( &ui->colors[ UI_COLOR_GRAYSCALE_2 ], 0x94, 0xb6, 0x9c ); /* #94b69c */ @@ -6087,21 +6035,21 @@ static int gui_load( x49gp_module_t* module, GKeyFile* keyfile ) break; } - /* Load faceplate base texture into faceplate_texture */ + /* Load faceplate base texture */ GError* gerror = NULL; - char* faceplate_texture; + char* faceplate_texture_data; int fd = x49gp_module_open_rodata( module, ui->calculator == UI_CALCULATOR_HP49GP || ui->calculator == UI_CALCULATOR_HP49GP_NEWRPL ? "hp49g+-cropped.png" : /* "blank.png" */ "hp50g-cropped.png", - &faceplate_texture ); + &faceplate_texture_data ); if ( fd < 0 ) return fd; - ui->bg_pixbuf = gdk_pixbuf_new_from_file( faceplate_texture, &gerror ); + ui->bg_pixbuf = gdk_pixbuf_new_from_file( faceplate_texture_data, &gerror ); - /* set ui->width and ui->height based on faceplate_texture dimensions */ - gdk_pixbuf_get_file_info( faceplate_texture, &ui->width, &ui->height ); + /* set ui->width and ui->height based on faceplate_texture_data dimensions */ + gdk_pixbuf_get_file_info( faceplate_texture_data, &ui->width, &ui->height ); close( fd ); /* set coordinates of LCD and keyboard */ diff --git a/src/x49gpng/x49gp_ui.h b/src/x49gpng/x49gp_ui.h index 4cbd676..1c4b389 100644 --- a/src/x49gpng/x49gp_ui.h +++ b/src/x49gpng/x49gp_ui.h @@ -118,19 +118,12 @@ struct __x49gp_ui_s__ { GtkWidget* lcd_canvas; GdkPixmap* lcd_pixmap; - GdkGC* ann_left_gc; - GdkGC* ann_right_gc; - GdkGC* ann_alpha_gc; - GdkGC* ann_battery_gc; - GdkGC* ann_busy_gc; - GdkGC* ann_io_gc; - - GdkBitmap* ann_left; - GdkBitmap* ann_right; - GdkBitmap* ann_alpha; - GdkBitmap* ann_battery; - GdkBitmap* ann_busy; - GdkBitmap* ann_io; + cairo_surface_t* ann_left_surface; + cairo_surface_t* ann_right_surface; + cairo_surface_t* ann_alpha_surface; + cairo_surface_t* ann_battery_surface; + cairo_surface_t* ann_busy_surface; + cairo_surface_t* ann_io_surface; gint width; gint height;