# HG changeset patch # User mhessling@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1052447571 0 # Node ID 2059f18e9c205adb07e2233596f05f1d7d610d05 # Parent 2dbed2673df0df594a0d17ec4b295cdc5f2e0337 Add extra button to test mouse cursor change. diff -r 2dbed2673df0 -r 2059f18e9c20 dwtest.c --- a/dwtest.c Thu May 08 08:59:26 2003 +0000 +++ b/dwtest.c Fri May 09 02:32:51 2003 +0000 @@ -29,6 +29,7 @@ HWND mainwindow, entryfield, + cursortogglebutton, okbutton, cancelbutton, lbbox, @@ -65,6 +66,7 @@ int num_lines=0; int max_linewidth=0; int current_row=0,current_col=0; +int cursor_arrow = 1; FILE *fp=NULL; char **lp; @@ -251,6 +253,24 @@ } } +int DWSIGNAL cursortoggle_callback(HWND window, void *data) +{ + if(cursor_arrow) + { + dw_window_set_text((HWND)cursortogglebutton,"Set Cursor pointer - ARROW"); + dw_window_pointer((HWND)data,DW_POINTER_CLOCK); + cursor_arrow = 0; + } + else + { + dw_window_set_text((HWND)cursortogglebutton,"Set Cursor pointer - CLOCK"); + dw_window_pointer((HWND)data,DW_POINTER_ARROW); + cursor_arrow = 1; + } + dw_window_show(mainwindow); + return FALSE; +} + int DWSIGNAL beep_callback(HWND window, void *data) { dw_timer_disconnect( timerid ); @@ -456,6 +476,10 @@ dw_box_pack_start(lbbox, buttonbox, 0, 0, TRUE, TRUE, 0); + cursortogglebutton = dw_button_new("Set Cursor pointer - CLOCK", 1003L); + + dw_box_pack_start(buttonbox, cursortogglebutton, 130, 30, TRUE, TRUE, 2); + okbutton = dw_button_new("Turn Off Annoying Beep!", 1001L); dw_box_pack_start(buttonbox, okbutton, 130, 30, TRUE, TRUE, 2); @@ -472,6 +496,7 @@ dw_signal_connect(browsebutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(browse_callback), (void *)notebookbox1); dw_signal_connect(okbutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(beep_callback), (void *)notebookbox1); dw_signal_connect(cancelbutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(exit_callback), (void *)mainwindow); + dw_signal_connect(cursortogglebutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(cursortoggle_callback), (void *)mainwindow); }