Mercurial > dwindows
comparison dwtest.c @ 2104:6e55c6f8d816
Added initial notification callback code to the test program.
Win: Added initial notification callback handler glue and fixed a memory leak.
The activation callbacks do not seem to be triggering so added some debug code to test.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 16 Jun 2020 00:16:59 +0000 |
parents | 296a3872ddd9 |
children | 10c22853b479 |
comparison
equal
deleted
inserted
replaced
2103:2417bc294e30 | 2104:6e55c6f8d816 |
---|---|
585 dw_main_quit(); | 585 dw_main_quit(); |
586 } | 586 } |
587 return TRUE; | 587 return TRUE; |
588 } | 588 } |
589 | 589 |
590 int DWSIGNAL notification_clicked_callback(HWND notification, void *data) | |
591 { | |
592 dw_debug("Notification clicked\n"); | |
593 } | |
594 | |
590 int DWSIGNAL browse_file_callback(HWND window, void *data) | 595 int DWSIGNAL browse_file_callback(HWND window, void *data) |
591 { | 596 { |
592 char *tmp; | 597 char *tmp; |
593 tmp = dw_file_browse("Pick a file", "dwtest.c", "c", DW_FILE_OPEN ); | 598 tmp = dw_file_browse("Pick a file", "dwtest.c", "c", DW_FILE_OPEN ); |
594 if ( tmp ) | 599 if ( tmp ) |
602 current_file = tmp; | 607 current_file = tmp; |
603 dw_window_set_text( entryfield, current_file ); | 608 dw_window_set_text( entryfield, current_file ); |
604 read_file(); | 609 read_file(); |
605 current_col = current_row = 0; | 610 current_col = current_row = 0; |
606 update_render(); | 611 update_render(); |
612 dw_signal_connect(notification, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(notification_clicked_callback), NULL); | |
607 dw_notification_send(notification); | 613 dw_notification_send(notification); |
608 } | 614 } |
609 dw_window_set_focus(copypastefield); | 615 dw_window_set_focus(copypastefield); |
610 return 0; | 616 return 0; |
611 } | 617 } |