int nhgetch() -- Returns a single character input from the user. -- In the tty window-port, nhgetch() assumes that tgetch() will be the routine the OS provides to read a character. Returned character _must_ be non-zero. */
| 896 | Returned character _must_ be non-zero. |
| 897 | */ |
| 898 | int |
| 899 | gnome_nhgetch() |
| 900 | { |
| 901 | int key; |
| 902 | GList *theFirst; |
| 903 | gtk_signal_emit(GTK_OBJECT(gnome_windowlist[WIN_STATUS].win), |
| 904 | ghack_signals[GHSIG_FADE_HIGHLIGHT]); |
| 905 | |
| 906 | g_askingQuestion = 1; |
| 907 | /* Process events until a key press event arrives. */ |
| 908 | while (g_numKeys == 0) { |
| 909 | if (program_state.done_hup) |
| 910 | return '\033'; |
| 911 | gtk_main_iteration(); |
| 912 | } |
| 913 | |
| 914 | theFirst = g_list_first(g_keyBuffer); |
| 915 | g_keyBuffer = g_list_remove_link(g_keyBuffer, theFirst); |
| 916 | key = GPOINTER_TO_INT(theFirst->data); |
| 917 | g_list_free_1(theFirst); |
| 918 | g_numKeys--; |
| 919 | g_askingQuestion = 0; |
| 920 | return (key); |
| 921 | } |
| 922 | |
| 923 | /* |
| 924 | int nh_poskey(int *x, int *y, int *mod) |
no outgoing calls
no test coverage detected