comparison dwtest.c @ 1844:1558f5e14f83

Added code and comment to the test program demonstrating trapping application quit on Mac. Also update readme, and other distribution files in preparation for 2.5 release. Added a dedication to my late father.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 18 Dec 2012 21:51:09 +0000
parents b35e041fc114
children b5e1ccc76e58
comparison
equal deleted inserted replaced
1843:2fe7fca61236 1844:1558f5e14f83
1789 1789
1790 /* Set the default field */ 1790 /* Set the default field */
1791 dw_window_default(mainwindow, copypastefield); 1791 dw_window_default(mainwindow, copypastefield);
1792 1792
1793 dw_signal_connect(mainwindow, DW_SIGNAL_DELETE, DW_SIGNAL_FUNC(exit_callback), DW_POINTER(mainwindow)); 1793 dw_signal_connect(mainwindow, DW_SIGNAL_DELETE, DW_SIGNAL_FUNC(exit_callback), DW_POINTER(mainwindow));
1794 /*
1795 * The following is a special case handler for the Mac and other platforms which contain
1796 * an application object which can be closed. It function identically to a window delete/close
1797 * request except it applies to the entire application not an individual window. If it is not
1798 * handled or you allow the default handler to take place the entire application will close.
1799 * On platforms which do not have an application object this line will be ignored.
1800 */
1801 dw_signal_connect(DW_DESKTOP, DW_SIGNAL_DELETE, DW_SIGNAL_FUNC(exit_callback), DW_POINTER(mainwindow));
1794 timerid = dw_timer_connect(2000, DW_SIGNAL_FUNC(timer_callback), 0); 1802 timerid = dw_timer_connect(2000, DW_SIGNAL_FUNC(timer_callback), 0);
1795 dw_window_set_size(mainwindow, 640, 550); 1803 dw_window_set_size(mainwindow, 640, 550);
1796 dw_window_show(mainwindow); 1804 dw_window_show(mainwindow);
1797 1805
1798 /* Now that the window is created and shown... 1806 /* Now that the window is created and shown...