55 { -1, 0, 0, 0, 0, 0, 0, NULL } |
57 { -1, 0, 0, 0, 0, 0, 0, NULL } |
56 }; |
58 }; |
57 |
59 |
58 |
60 |
59 |
61 |
|
62 int Dialog_LCDinit(int *x, int *y, int *w, int *h, int *cols, int *rows, int index) |
|
63 { |
|
64 int retval; |
|
65 |
|
66 retval = SDLGui_LCDinit(maindlg, x, y, w, h, cols, rows, index); |
|
67 |
|
68 fprintf(stdout, "SDLGui_LCDinit(maindlg, %d, %d, %d, %d, %d, %d, %d) = %d\n", *x, *y, *w, *h, *cols, *rows, index, retval); |
|
69 return retval; |
|
70 } |
|
71 |
|
72 |
60 |
73 |
61 /* |
74 /* |
62 * This functions sets up the actual font and then displays the brew panel dialog. |
75 * This functions sets up the actual font and then displays the brew panel dialog. |
63 */ |
76 */ |
64 int Dialog_BrewDlg(void) |
77 int Dialog_BrewDlg(void) |
65 { |
78 { |
66 int retbut; |
79 int retbut; |
67 int bOldMouseVisibility; |
80 int bOldMouseVisibility; |
68 int nOldMouseX, nOldMouseY; |
81 int nOldMouseX, nOldMouseY; |
|
82 int x, y, w, h, cols, rows, fd; |
69 |
83 |
70 if (SDLGui_SetScreen(PAN_surface)) { |
84 if (SDLGui_SetScreen(PAN_surface)) { |
71 syslog(LOG_NOTICE, "SDLGui_SetScreen(PAN_surface) failed: %s", SDL_GetError()); |
85 syslog(LOG_NOTICE, "SDLGui_SetScreen(PAN_surface) failed: %s", SDL_GetError()); |
72 return FALSE; |
86 return FALSE; |
73 } |
87 } |
75 SDL_GetMouseState(&nOldMouseX, &nOldMouseY); |
89 SDL_GetMouseState(&nOldMouseX, &nOldMouseY); |
76 bOldMouseVisibility = SDL_ShowCursor(SDL_QUERY); |
90 bOldMouseVisibility = SDL_ShowCursor(SDL_QUERY); |
77 SDL_ShowCursor(SDL_ENABLE); |
91 SDL_ShowCursor(SDL_ENABLE); |
78 |
92 |
79 SDLGui_CenterDlg(maindlg); |
93 SDLGui_CenterDlg(maindlg); |
|
94 SDLGui_DoDialogInit(maindlg); |
|
95 fd = Dialog_LCDinit(&x, &y, &w, &h, &cols, &rows, 0); |
|
96 fprintf(stdout, "Dialog_LCDinit(%d, %d, %d, %d, %d, %d, 0) = %d\n", x, y, w, h, cols, rows, fd); |
|
97 slcdInit(fd, x, y, w, h, cols, rows); |
80 |
98 |
81 do { |
99 do { |
82 retbut = SDLGui_DoDialog(maindlg, NULL); |
100 retbut = SDLGui_DoDialogLoop(maindlg); |
83 SDLGui_LCDwrite(maindlg, 0, 0, 'A', 0); |
101 slcdPuts(0, (char *)"Hello"); |
84 |
102 |
85 fprintf(stdout, "SDLGui_DoDialog retbut=%d\n", retbut); |
103 fprintf(stdout, "SDLGui_DoDialog retbut=%d\n", retbut); |
86 |
104 |
87 switch (retbut) { |
105 switch (retbut) { |
88 case MAINDLG_B1: fprintf(stdout, "Button 1\n"); |
106 case MAINDLG_B1: fprintf(stdout, "Button 1\n"); |