comparison gtk/dw.c @ 510:710f82598210

Change function names to be inline with Mark Hessling's Rexx/DW.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 09 Mar 2004 03:27:39 +0000
parents 078a40ba2e41
children 80dbd5a1f403
comparison
equal deleted inserted replaced
509:a9cfbc5ad01e 510:710f82598210
1803 * Changes the appearance of the mouse pointer. 1803 * Changes the appearance of the mouse pointer.
1804 * Parameters: 1804 * Parameters:
1805 * handle: Handle to widget for which to change. 1805 * handle: Handle to widget for which to change.
1806 * cursortype: ID of the pointer you want. 1806 * cursortype: ID of the pointer you want.
1807 */ 1807 */
1808 void dw_window_pointer(HWND handle, int pointertype) 1808 void dw_window_set_pointer(HWND handle, int pointertype)
1809 { 1809 {
1810 int _locked_by_me = FALSE; 1810 int _locked_by_me = FALSE;
1811 GdkCursor *cursor; 1811 GdkCursor *cursor;
1812 1812
1813 DW_MUTEX_LOCK; 1813 DW_MUTEX_LOCK;
3204 * Parameters: 3204 * Parameters:
3205 * handle: Handle to the MLE to be queried. 3205 * handle: Handle to the MLE to be queried.
3206 * bytes: A pointer to a variable to return the total bytes. 3206 * bytes: A pointer to a variable to return the total bytes.
3207 * lines: A pointer to a variable to return the number of lines. 3207 * lines: A pointer to a variable to return the number of lines.
3208 */ 3208 */
3209 void dw_mle_query(HWND handle, unsigned long *bytes, unsigned long *lines) 3209 void dw_mle_get_size(HWND handle, unsigned long *bytes, unsigned long *lines)
3210 { 3210 {
3211 int _locked_by_me = FALSE; 3211 int _locked_by_me = FALSE;
3212 3212
3213 if(bytes) 3213 if(bytes)
3214 *bytes = 0; 3214 *bytes = 0;
3350 * Sets the visible line of an MLE box. 3350 * Sets the visible line of an MLE box.
3351 * Parameters: 3351 * Parameters:
3352 * handle: Handle to the MLE. 3352 * handle: Handle to the MLE.
3353 * line: Line to be visible. 3353 * line: Line to be visible.
3354 */ 3354 */
3355 void dw_mle_set_visible(HWND handle, int line) 3355 void dw_mle_set_cursor_visible(HWND handle, int line)
3356 { 3356 {
3357 int _locked_by_me = FALSE; 3357 int _locked_by_me = FALSE;
3358 3358
3359 DW_MUTEX_LOCK; 3359 DW_MUTEX_LOCK;
3360 #if GTK_MAJOR_VERSION > 1 3360 #if GTK_MAJOR_VERSION > 1
3390 if(tmp && GTK_IS_TEXT(tmp)) 3390 if(tmp && GTK_IS_TEXT(tmp))
3391 { 3391 {
3392 unsigned long lines; 3392 unsigned long lines;
3393 float pos, ratio; 3393 float pos, ratio;
3394 3394
3395 dw_mle_query(handle, NULL, &lines); 3395 dw_mle_get_size(handle, NULL, &lines);
3396 3396
3397 if(lines) 3397 if(lines)
3398 { 3398 {
3399 ratio = (float)line/(float)lines; 3399 ratio = (float)line/(float)lines;
3400 3400
3412 * Sets the editablity of an MLE box. 3412 * Sets the editablity of an MLE box.
3413 * Parameters: 3413 * Parameters:
3414 * handle: Handle to the MLE. 3414 * handle: Handle to the MLE.
3415 * state: TRUE if it can be edited, FALSE for readonly. 3415 * state: TRUE if it can be edited, FALSE for readonly.
3416 */ 3416 */
3417 void dw_mle_set_editable(HWND handle, int state) 3417 void dw_mle_set_cursor_editable(HWND handle, int state)
3418 { 3418 {
3419 int _locked_by_me = FALSE; 3419 int _locked_by_me = FALSE;
3420 3420
3421 DW_MUTEX_LOCK; 3421 DW_MUTEX_LOCK;
3422 #if GTK_MAJOR_VERSION > 1 3422 #if GTK_MAJOR_VERSION > 1
3443 * Sets the word wrap state of an MLE box. 3443 * Sets the word wrap state of an MLE box.
3444 * Parameters: 3444 * Parameters:
3445 * handle: Handle to the MLE. 3445 * handle: Handle to the MLE.
3446 * state: TRUE if it wraps, FALSE if it doesn't. 3446 * state: TRUE if it wraps, FALSE if it doesn't.
3447 */ 3447 */
3448 void dw_mle_set_word_wrap(HWND handle, int state) 3448 void dw_mle_set_cursor_word_wrap(HWND handle, int state)
3449 { 3449 {
3450 int _locked_by_me = FALSE; 3450 int _locked_by_me = FALSE;
3451 3451
3452 DW_MUTEX_LOCK; 3452 DW_MUTEX_LOCK;
3453 #if GTK_MAJOR_VERSION > 1 3453 #if GTK_MAJOR_VERSION > 1
3477 * Sets the current cursor position of an MLE box. 3477 * Sets the current cursor position of an MLE box.
3478 * Parameters: 3478 * Parameters:
3479 * handle: Handle to the MLE to be positioned. 3479 * handle: Handle to the MLE to be positioned.
3480 * point: Point to position cursor. 3480 * point: Point to position cursor.
3481 */ 3481 */
3482 void dw_mle_set(HWND handle, int point) 3482 void dw_mle_set_cursor(HWND handle, int point)
3483 { 3483 {
3484 int _locked_by_me = FALSE; 3484 int _locked_by_me = FALSE;
3485 3485
3486 DW_MUTEX_LOCK; 3486 DW_MUTEX_LOCK;
3487 #if GTK_MAJOR_VERSION > 1 3487 #if GTK_MAJOR_VERSION > 1
3516 if(tmp && GTK_IS_TEXT(tmp)) 3516 if(tmp && GTK_IS_TEXT(tmp))
3517 { 3517 {
3518 unsigned long chars; 3518 unsigned long chars;
3519 float pos, ratio; 3519 float pos, ratio;
3520 3520
3521 dw_mle_query(handle, &chars, NULL); 3521 dw_mle_get_size(handle, &chars, NULL);
3522 3522
3523 if(chars) 3523 if(chars)
3524 { 3524 {
3525 ratio = (float)point/(float)chars; 3525 ratio = (float)point/(float)chars;
3526 3526
3663 /* 3663 /*
3664 * Returns the range of the percent bar. 3664 * Returns the range of the percent bar.
3665 * Parameters: 3665 * Parameters:
3666 * handle: Handle to the percent bar to be queried. 3666 * handle: Handle to the percent bar to be queried.
3667 */ 3667 */
3668 unsigned int dw_percent_query_range(HWND handle) 3668 unsigned int dw_percent_get_range(HWND handle)
3669 { 3669 {
3670 return 100; 3670 return 100;
3671 } 3671 }
3672 3672
3673 /* 3673 /*
3688 /* 3688 /*
3689 * Returns the position of the slider. 3689 * Returns the position of the slider.
3690 * Parameters: 3690 * Parameters:
3691 * handle: Handle to the slider to be queried. 3691 * handle: Handle to the slider to be queried.
3692 */ 3692 */
3693 unsigned int dw_slider_query_pos(HWND handle) 3693 unsigned int dw_slider_get_pos(HWND handle)
3694 { 3694 {
3695 int val = 0, _locked_by_me = FALSE; 3695 int val = 0, _locked_by_me = FALSE;
3696 GtkAdjustment *adjustment; 3696 GtkAdjustment *adjustment;
3697 3697
3698 if(!handle) 3698 if(!handle)
3745 /* 3745 /*
3746 * Returns the position of the scrollbar. 3746 * Returns the position of the scrollbar.
3747 * Parameters: 3747 * Parameters:
3748 * handle: Handle to the scrollbar to be queried. 3748 * handle: Handle to the scrollbar to be queried.
3749 */ 3749 */
3750 unsigned int dw_scrollbar_query_pos(HWND handle) 3750 unsigned int dw_scrollbar_get_pos(HWND handle)
3751 { 3751 {
3752 int val = 0, _locked_by_me = FALSE; 3752 int val = 0, _locked_by_me = FALSE;
3753 GtkAdjustment *adjustment; 3753 GtkAdjustment *adjustment;
3754 3754
3755 if(!handle) 3755 if(!handle)
3835 { 3835 {
3836 long curval; 3836 long curval;
3837 GtkAdjustment *adj; 3837 GtkAdjustment *adj;
3838 int _locked_by_me = FALSE; 3838 int _locked_by_me = FALSE;
3839 3839
3840 curval = dw_spinbutton_query(handle); 3840 curval = dw_spinbutton_get_pos(handle);
3841 DW_MUTEX_LOCK; 3841 DW_MUTEX_LOCK;
3842 adj = (GtkAdjustment *)gtk_adjustment_new((gfloat)curval, (gfloat)lower, (gfloat)upper, 1.0, 5.0, 0.0); 3842 adj = (GtkAdjustment *)gtk_adjustment_new((gfloat)curval, (gfloat)lower, (gfloat)upper, 1.0, 5.0, 0.0);
3843 gtk_spin_button_set_adjustment(GTK_SPIN_BUTTON(handle), adj); 3843 gtk_spin_button_set_adjustment(GTK_SPIN_BUTTON(handle), adj);
3844 DW_MUTEX_UNLOCK; 3844 DW_MUTEX_UNLOCK;
3845 } 3845 }
3862 /* 3862 /*
3863 * Returns the current value of the spinbutton. 3863 * Returns the current value of the spinbutton.
3864 * Parameters: 3864 * Parameters:
3865 * handle: Handle to the spinbutton to be queried. 3865 * handle: Handle to the spinbutton to be queried.
3866 */ 3866 */
3867 long dw_spinbutton_query(HWND handle) 3867 long dw_spinbutton_get_pos(HWND handle)
3868 { 3868 {
3869 long retval; 3869 long retval;
3870 int _locked_by_me = FALSE; 3870 int _locked_by_me = FALSE;
3871 3871
3872 DW_MUTEX_LOCK; 3872 DW_MUTEX_LOCK;
3879 /* 3879 /*
3880 * Returns the state of the checkbox. 3880 * Returns the state of the checkbox.
3881 * Parameters: 3881 * Parameters:
3882 * handle: Handle to the checkbox to be queried. 3882 * handle: Handle to the checkbox to be queried.
3883 */ 3883 */
3884 int dw_checkbox_query(HWND handle) 3884 int dw_checkbox_get(HWND handle)
3885 { 3885 {
3886 int retval; 3886 int retval;
3887 int _locked_by_me = FALSE; 3887 int _locked_by_me = FALSE;
3888 3888
3889 DW_MUTEX_LOCK; 3889 DW_MUTEX_LOCK;
3991 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0); 3991 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
3992 gtk_widget_show(label); 3992 gtk_widget_show(label);
3993 gtk_widget_show(hbox); 3993 gtk_widget_show(hbox);
3994 3994
3995 { 3995 {
3996 void *thisfunc = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_expand_func"); 3996 void *thisfunc = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_item_expand_func");
3997 void *mydata = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_expand_data"); 3997 void *mydata = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_item_expand_data");
3998 SignalHandler work = _get_signal_handler(tree, mydata); 3998 SignalHandler work = _get_signal_handler(tree, mydata);
3999 3999
4000 if(thisfunc && work.window) 4000 if(thisfunc && work.window)
4001 { 4001 {
4002 int sigid = _set_signal_handler(newitem, work.window, work.func, work.data, thisfunc); 4002 int sigid = _set_signal_handler(newitem, work.window, work.func, work.data, thisfunc);
4137 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0); 4137 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
4138 gtk_widget_show(label); 4138 gtk_widget_show(label);
4139 gtk_widget_show(hbox); 4139 gtk_widget_show(hbox);
4140 4140
4141 { 4141 {
4142 void *thisfunc = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_expand_func"); 4142 void *thisfunc = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_item_expand_func");
4143 void *mydata = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_expand_data"); 4143 void *mydata = (void *)gtk_object_get_data(GTK_OBJECT(tree), "_dw_tree_item_expand_data");
4144 SignalHandler work = _get_signal_handler(tree, mydata); 4144 SignalHandler work = _get_signal_handler(tree, mydata);
4145 4145
4146 if(thisfunc && work.window) 4146 if(thisfunc && work.window)
4147 { 4147 {
4148 int sigid = _set_signal_handler(item, work.window, work.func, work.data, thisfunc); 4148 int sigid = _set_signal_handler(item, work.window, work.func, work.data, thisfunc);
4214 * handle: Handle to the tree containing the item. 4214 * handle: Handle to the tree containing the item.
4215 * item: Handle of the item to be modified. 4215 * item: Handle of the item to be modified.
4216 * title: The text title of the entry. 4216 * title: The text title of the entry.
4217 * icon: Handle to coresponding icon. 4217 * icon: Handle to coresponding icon.
4218 */ 4218 */
4219 void dw_tree_set(HWND handle, HTREEITEM item, char *title, unsigned long icon) 4219 void dw_tree_item_change(HWND handle, HTREEITEM item, char *title, unsigned long icon)
4220 { 4220 {
4221 #if GTK_MAJOR_VERSION > 1 4221 #if GTK_MAJOR_VERSION > 1
4222 GtkWidget *tree; 4222 GtkWidget *tree;
4223 GtkTreeStore *store; 4223 GtkTreeStore *store;
4224 GdkPixbuf *pixbuf; 4224 GdkPixbuf *pixbuf;
4279 * Parameters: 4279 * Parameters:
4280 * handle: Handle to the tree containing the item. 4280 * handle: Handle to the tree containing the item.
4281 * item: Handle of the item to be modified. 4281 * item: Handle of the item to be modified.
4282 * itemdata: User defined data to be associated with item. 4282 * itemdata: User defined data to be associated with item.
4283 */ 4283 */
4284 void dw_tree_set_data(HWND handle, HTREEITEM item, void *itemdata) 4284 void dw_tree_item_change_data(HWND handle, HTREEITEM item, void *itemdata)
4285 { 4285 {
4286 #if GTK_MAJOR_VERSION > 1 4286 #if GTK_MAJOR_VERSION > 1
4287 GtkWidget *tree; 4287 GtkWidget *tree;
4288 GtkTreeStore *store; 4288 GtkTreeStore *store;
4289 int _locked_by_me = FALSE; 4289 int _locked_by_me = FALSE;
4384 * Gets the item data of a tree item. 4384 * Gets the item data of a tree item.
4385 * Parameters: 4385 * Parameters:
4386 * handle: Handle to the tree containing the item. 4386 * handle: Handle to the tree containing the item.
4387 * item: Handle of the item to be modified. 4387 * item: Handle of the item to be modified.
4388 */ 4388 */
4389 void *dw_tree_get_data(HWND handle, HTREEITEM item) 4389 void *dw_tree_item_get_data(HWND handle, HTREEITEM item)
4390 { 4390 {
4391 void *ret = NULL; 4391 void *ret = NULL;
4392 #if GTK_MAJOR_VERSION > 1 4392 #if GTK_MAJOR_VERSION > 1
4393 GtkWidget *tree; 4393 GtkWidget *tree;
4394 GtkTreeModel *store; 4394 GtkTreeModel *store;
4538 * Expands a node on a tree. 4538 * Expands a node on a tree.
4539 * Parameters: 4539 * Parameters:
4540 * handle: Handle to the tree window (widget). 4540 * handle: Handle to the tree window (widget).
4541 * item: Handle to node to be expanded. 4541 * item: Handle to node to be expanded.
4542 */ 4542 */
4543 void dw_tree_expand(HWND handle, HTREEITEM item) 4543 void dw_tree_item_expand(HWND handle, HTREEITEM item)
4544 { 4544 {
4545 #if GTK_MAJOR_VERSION > 1 4545 #if GTK_MAJOR_VERSION > 1
4546 GtkWidget *tree; 4546 GtkWidget *tree;
4547 GtkTreeStore *store; 4547 GtkTreeStore *store;
4548 int _locked_by_me = FALSE; 4548 int _locked_by_me = FALSE;
4579 * Collapses a node on a tree. 4579 * Collapses a node on a tree.
4580 * Parameters: 4580 * Parameters:
4581 * handle: Handle to the tree window (widget). 4581 * handle: Handle to the tree window (widget).
4582 * item: Handle to node to be collapsed. 4582 * item: Handle to node to be collapsed.
4583 */ 4583 */
4584 void dw_tree_collapse(HWND handle, HTREEITEM item) 4584 void dw_tree_item_collapse(HWND handle, HTREEITEM item)
4585 { 4585 {
4586 #if GTK_MAJOR_VERSION > 1 4586 #if GTK_MAJOR_VERSION > 1
4587 GtkWidget *tree; 4587 GtkWidget *tree;
4588 GtkTreeStore *store; 4588 GtkTreeStore *store;
4589 int _locked_by_me = FALSE; 4589 int _locked_by_me = FALSE;
4618 * Removes a node from a tree. 4618 * Removes a node from a tree.
4619 * Parameters: 4619 * Parameters:
4620 * handle: Handle to the window (widget) to be cleared. 4620 * handle: Handle to the window (widget) to be cleared.
4621 * item: Handle to node to be deleted. 4621 * item: Handle to node to be deleted.
4622 */ 4622 */
4623 void dw_tree_delete(HWND handle, HTREEITEM item) 4623 void dw_tree_item_delete(HWND handle, HTREEITEM item)
4624 { 4624 {
4625 #if GTK_MAJOR_VERSION > 1 4625 #if GTK_MAJOR_VERSION > 1
4626 GtkWidget *tree; 4626 GtkWidget *tree;
4627 GtkTreeStore *store; 4627 GtkTreeStore *store;
4628 int _locked_by_me = FALSE; 4628 int _locked_by_me = FALSE;
6603 * Parameters: 6603 * Parameters:
6604 * handle: Window (widget) handle. 6604 * handle: Window (widget) handle.
6605 * width: New width in pixels. 6605 * width: New width in pixels.
6606 * height: New height in pixels. 6606 * height: New height in pixels.
6607 */ 6607 */
6608 void dw_window_set_usize(HWND handle, unsigned long width, unsigned long height) 6608 void dw_window_set_size(HWND handle, unsigned long width, unsigned long height)
6609 { 6609 {
6610 int _locked_by_me = FALSE; 6610 int _locked_by_me = FALSE;
6611 6611
6612 if(!handle) 6612 if(!handle)
6613 return; 6613 return;
6704 return; 6704 return;
6705 6705
6706 DW_MUTEX_LOCK; 6706 DW_MUTEX_LOCK;
6707 if(GTK_IS_WINDOW(handle)) 6707 if(GTK_IS_WINDOW(handle))
6708 { 6708 {
6709 dw_window_set_usize(handle, width, height); 6709 dw_window_set_size(handle, width, height);
6710 gtk_widget_set_uposition(handle, x, y); 6710 gtk_widget_set_uposition(handle, x, y);
6711 } 6711 }
6712 else if(handle->window) 6712 else if(handle->window)
6713 { 6713 {
6714 gdk_window_resize(handle->window, width, height); 6714 gdk_window_resize(handle->window, width, height);
6893 /* 6893 /*
6894 * Queries the currently visible page ID. 6894 * Queries the currently visible page ID.
6895 * Parameters: 6895 * Parameters:
6896 * handle: Handle to the notebook widget. 6896 * handle: Handle to the notebook widget.
6897 */ 6897 */
6898 unsigned long dw_notebook_page_query(HWND handle) 6898 unsigned long dw_notebook_page_get(HWND handle)
6899 { 6899 {
6900 int retval, phys; 6900 int retval, phys;
6901 int _locked_by_me = FALSE; 6901 int _locked_by_me = FALSE;
6902 6902
6903 DW_MUTEX_LOCK; 6903 DW_MUTEX_LOCK;
7209 * handle: Handle to the listbox to be queried. 7209 * handle: Handle to the listbox to be queried.
7210 * index: Index into the list to be queried. 7210 * index: Index into the list to be queried.
7211 * buffer: Buffer where text will be copied. 7211 * buffer: Buffer where text will be copied.
7212 * length: Length of the buffer (including NULL). 7212 * length: Length of the buffer (including NULL).
7213 */ 7213 */
7214 void dw_listbox_query_text(HWND handle, unsigned int index, char *buffer, unsigned int length) 7214 void dw_listbox_get_text(HWND handle, unsigned int index, char *buffer, unsigned int length)
7215 { 7215 {
7216 GtkWidget *handle2 = handle; 7216 GtkWidget *handle2 = handle;
7217 int _locked_by_me = FALSE; 7217 int _locked_by_me = FALSE;
7218 7218
7219 DW_MUTEX_LOCK; 7219 DW_MUTEX_LOCK;
7933 7933
7934 if(S_IFDIR & bleah.st_mode) 7934 if(S_IFDIR & bleah.st_mode)
7935 { 7935 {
7936 item = dw_tree_insert(tree, dent->d_name, 0, parent, (void *)parent); 7936 item = dw_tree_insert(tree, dent->d_name, 0, parent, (void *)parent);
7937 tempitem = dw_tree_insert(tree, "", 0, item, 0); 7937 tempitem = dw_tree_insert(tree, "", 0, item, 0);
7938 dw_tree_set_data(tree, item, (void *)tempitem); 7938 dw_tree_item_change_data(tree, item, (void *)tempitem);
7939 } 7939 }
7940 7940
7941 free(folder); 7941 free(folder);
7942 } 7942 }
7943 } 7943 }
8012 8012
8013 static int DWSIGNAL _tree_expand(HWND window, HTREEITEM item, void *data) 8013 static int DWSIGNAL _tree_expand(HWND window, HTREEITEM item, void *data)
8014 { 8014 {
8015 DWDialog *dwwait = (DWDialog *)data; 8015 DWDialog *dwwait = (DWDialog *)data;
8016 HWND tree = (HWND)dw_window_get_data((HWND)dwwait->data, "_dw_tree"); 8016 HWND tree = (HWND)dw_window_get_data((HWND)dwwait->data, "_dw_tree");
8017 HTREEITEM tempitem = (HTREEITEM)dw_tree_get_data(tree, item); 8017 HTREEITEM tempitem = (HTREEITEM)dw_tree_item_get_data(tree, item);
8018 8018
8019 if(tempitem) 8019 if(tempitem)
8020 { 8020 {
8021 char *folder = _tree_folder(tree, item); 8021 char *folder = _tree_folder(tree, item);
8022 8022
8023 dw_tree_set_data(tree, item, 0); 8023 dw_tree_item_change_data(tree, item, 0);
8024 8024
8025 if(*folder) 8025 if(*folder)
8026 _populate_directory(tree, item, folder); 8026 _populate_directory(tree, item, folder);
8027 8027
8028 #if GTK_MAJOR_VERSION > 1 8028 #if GTK_MAJOR_VERSION > 1
8029 /* FIXME: GTK 1.x tree control goes crazy when 8029 /* FIXME: GTK 1.x tree control goes crazy when
8030 * I delete the temporary item. The subtree 8030 * I delete the temporary item. The subtree
8031 * it sits on ceases to be valid and attempts 8031 * it sits on ceases to be valid and attempts
8032 * to delete or recreate it fail horribly. 8032 * to delete or recreate it fail horribly.
8033 */ 8033 */
8034 dw_tree_delete(tree, tempitem); 8034 dw_tree_item_delete(tree, tempitem);
8035 #endif 8035 #endif
8036 free(folder); 8036 free(folder);
8037 } 8037 }
8038 8038
8039 return FALSE; 8039 return FALSE;
8090 dw_box_pack_start(hbox, button, 50, 30, TRUE, FALSE, 3); 8090 dw_box_pack_start(hbox, button, 50, 30, TRUE, FALSE, 3);
8091 dw_signal_connect(button, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(_dw_folder_cancel_func), (void *)dwwait); 8091 dw_signal_connect(button, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(_dw_folder_cancel_func), (void *)dwwait);
8092 8092
8093 item = dw_tree_insert(tree, "/", 0, NULL, 0); 8093 item = dw_tree_insert(tree, "/", 0, NULL, 0);
8094 tempitem = dw_tree_insert(tree, "", 0, item, 0); 8094 tempitem = dw_tree_insert(tree, "", 0, item, 0);
8095 dw_tree_set_data(tree, item, (void *)tempitem); 8095 dw_tree_item_change_data(tree, item, (void *)tempitem);
8096 8096
8097 dw_window_set_usize(window, 225, 300); 8097 dw_window_set_size(window, 225, 300);
8098 dw_window_show(window); 8098 dw_window_show(window);
8099 } 8099 }
8100 else 8100 else
8101 { 8101 {
8102 DW_MUTEX_LOCK; 8102 DW_MUTEX_LOCK;
8448 else if(GTK_IS_TREE(thiswindow) && strcmp(signame, DW_SIGNAL_TREE_EXPAND) == 0) 8448 else if(GTK_IS_TREE(thiswindow) && strcmp(signame, DW_SIGNAL_TREE_EXPAND) == 0)
8449 { 8449 {
8450 if(thisfunc) 8450 if(thisfunc)
8451 { 8451 {
8452 sigid = _set_signal_handler(thiswindow, window, sigfunc, data, thisfunc); 8452 sigid = _set_signal_handler(thiswindow, window, sigfunc, data, thisfunc);
8453 gtk_object_set_data(GTK_OBJECT(thiswindow), "_dw_tree_expand_func", (gpointer)thisfunc); 8453 gtk_object_set_data(GTK_OBJECT(thiswindow), "_dw_tree_item_expand_func", (gpointer)thisfunc);
8454 gtk_object_set_data(GTK_OBJECT(thiswindow), "_dw_tree_expand_data", (gpointer)sigid); 8454 gtk_object_set_data(GTK_OBJECT(thiswindow), "_dw_tree_item_expand_data", (gpointer)sigid);
8455 } 8455 }
8456 DW_MUTEX_UNLOCK; 8456 DW_MUTEX_UNLOCK;
8457 return; 8457 return;
8458 } 8458 }
8459 #endif 8459 #endif