win32 USER_SOUNDS
This uses pmatch() as a default pattern matcher, and #defines USER_SOUNDS_REGEX for Qt to enable the code for regular expressions. This is enabled for win32tty and win32gui.
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
|
||||
#define MORE "--More--"
|
||||
|
||||
|
||||
|
||||
struct window_line {
|
||||
int attr;
|
||||
char text[MAXWINDOWTEXT];
|
||||
@@ -61,6 +59,10 @@ static COLORREF setMsgTextColor(HDC hdc, int gray);
|
||||
static void onPaint(HWND hWnd);
|
||||
static void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
#ifdef USER_SOUNDS
|
||||
extern void play_sound_for_message(const char* str);
|
||||
#endif
|
||||
|
||||
HWND mswin_init_message_window () {
|
||||
static int run_once = 0;
|
||||
HWND ret;
|
||||
@@ -242,6 +244,10 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
/* update window content */
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
|
||||
#ifdef USER_SOUNDS
|
||||
play_sound_for_message(msg_data->text);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user