changeset 333:b6491cefa512

Add test for switch-page signal.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 09 Apr 2003 09:55:10 +0000
parents 7b0f00729a32
children 0a15a1f3fbed
files dwtest.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dwtest.c	Wed Apr 09 09:43:01 2003 +0000
+++ b/dwtest.c	Wed Apr 09 09:55:10 2003 +0000
@@ -386,6 +386,14 @@
 	return 0;
 }
 
+int DWSIGNAL switch_page_cb( HWND window, int page_num, void *itemdata )
+{
+FILE *fp=fopen("log","a");
+	fprintf(fp,"DW_SIGNAL_SWITCH_PAGE: Window: %x PageNum: %d Itemdata: %x\n", (unsigned int)window, (unsigned int)page_num, (unsigned int)itemdata );
+fclose(fp);
+	return 0;
+}
+
 void archive_add(void)
 {
 	HWND browsebutton, browsebox;
@@ -624,6 +632,7 @@
 
 	notebook = dw_notebook_new( 1, TRUE );
 	dw_box_pack_start( notebookbox, notebook, 100, 100, TRUE, TRUE, 0);
+	dw_signal_connect(notebook, DW_SIGNAL_SWITCH_PAGE, DW_SIGNAL_FUNC(switch_page_cb), NULL);
 
 	notebookbox1 = dw_box_new( BOXVERT, 5 );
 	notebookpage1 = dw_notebook_page_new( notebook, 0, TRUE );