diff --git a/src/ui_sdl.c b/src/ui_sdl.c index 9711aaa..7c1f1eb 100644 --- a/src/ui_sdl.c +++ b/src/ui_sdl.c @@ -52,75 +52,8 @@ static unsigned KEYBOARD_HEIGHT, KEYBOARD_WIDTH, TOP_SKIP, SIDE_SKIP, BOTTOM_SKI DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISP_FRAME, KEYBOARD_OFFSET_X, KEYBOARD_OFFSET_Y, KBD_UPLINE; static unsigned int ARGBColors[ NB_COLORS ]; - -static sdl_surfaces_on_off_struct_t sdl_buttons[ NB_KEYS ] = { - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, -}; - -static sdl_surfaces_on_off_struct_t sdl_ann_tbl[] = { - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, - {.surfaceon = 0, .surfaceoff = 0}, -}; +static sdl_surfaces_on_off_struct_t sdl_buttons[ NB_KEYS ]; +static sdl_surfaces_on_off_struct_t sdl_ann_tbl[ NB_ANNUNCIATORS ]; // State to displayed zoomed last pressed key static SDL_Surface* showkeylastsurf = 0; diff --git a/src/ui_x11.c b/src/ui_x11.c index 6fda8b5..67cd629 100644 --- a/src/ui_x11.c +++ b/src/ui_x11.c @@ -220,28 +220,7 @@ static bool mapped; static x11_keypad_t keypad; -static XColor x11_colors[ NB_COLORS ] = { - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, - {0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0}, -}; +static XColor x11_colors[ NB_COLORS ]; static int CompletionType = -1; @@ -276,65 +255,7 @@ static int icon_color_mode; static char* res_name; static char* res_class; -static x11_button_t x11_buttons[ NB_KEYS ] = { - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, - {.map = 0, .down = 0, .xwin = 0}, -}; +static x11_button_t x11_buttons[ NB_KEYS ]; #define MAX_PASTE 128 static int paste[ MAX_PASTE * 3 ]; @@ -377,9 +298,7 @@ static unsigned char nibbles[ 16 ][ 2 ] = { static unsigned char nibble_bitmap[ 16 ]; -static Pixmap x11_ann_pixmaps[ NB_ANNUNCIATORS ] = { - 0, 0, 0, 0, 0, 0, -}; +static Pixmap x11_ann_pixmaps[ NB_ANNUNCIATORS ]; static icon_map_t icon_maps_sx[] = { {.w = hp48_icon_width, .h = hp48_icon_height, .c = BLACK, .bits = hp48_icon_bitmap },