Mercurial > dwindows
comparison os2/dw.c @ 503:f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
Also, added _fix_button_owner() to dw_window_redraw() on OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 18 Jan 2004 06:33:25 +0000 |
parents | fe12a72bfddf |
children | c607eb385e58 |
comparison
equal
deleted
inserted
replaced
502:56ea525c1a24 | 503:f3ed8dda02f8 |
---|---|
300 | 300 |
301 if(hbm) | 301 if(hbm) |
302 GpiDeleteBitmap(hbm); | 302 GpiDeleteBitmap(hbm); |
303 } | 303 } |
304 | 304 |
305 /* This function removes and handlers on windows and frees | 305 /* This function removes any handlers on windows and frees |
306 * the user memory allocated to it. | 306 * the user memory allocated to it. |
307 */ | 307 */ |
308 void _free_window_memory(HWND handle) | 308 void _free_window_memory(HWND handle) |
309 { | 309 { |
310 HENUM henum; | 310 HENUM henum; |
3684 { | 3684 { |
3685 HWND client = WinWindowFromID(handle, FID_CLIENT); | 3685 HWND client = WinWindowFromID(handle, FID_CLIENT); |
3686 HWND window = client ? client : handle; | 3686 HWND window = client ? client : handle; |
3687 Box *mybox = (Box *)WinQueryWindowPtr(window, QWP_USER); | 3687 Box *mybox = (Box *)WinQueryWindowPtr(window, QWP_USER); |
3688 | 3688 |
3689 _fix_button_owner(_toplevel_window(handle), 0); | |
3689 if(window && mybox) | 3690 if(window && mybox) |
3690 { | 3691 { |
3691 unsigned long width, height; | 3692 unsigned long width, height; |
3692 | 3693 |
3693 dw_window_get_pos_size(window, NULL, NULL, &width, &height); | 3694 dw_window_get_pos_size(window, NULL, NULL, &width, &height); |
6600 count++; | 6601 count++; |
6601 } | 6602 } |
6602 } | 6603 } |
6603 | 6604 |
6604 /* | 6605 /* |
6606 * Changes an existing item in specified row and column to the given data. | |
6607 * Parameters: | |
6608 * handle: Handle to the container window (widget). | |
6609 * column: Zero based column of data being set. | |
6610 * row: Zero based row of data being set. | |
6611 * data: Pointer to the data to be added. | |
6612 */ | |
6613 void API dw_filesystem_change_item(HWND handle, int column, int row, void *data) | |
6614 { | |
6615 dw_container_change_item(handle, column + 2, row, data); | |
6616 } | |
6617 | |
6618 /* | |
6619 * Changes an item in specified row and column to the given data. | |
6620 * Parameters: | |
6621 * handle: Handle to the container window (widget). | |
6622 * pointer: Pointer to the allocated memory in dw_container_alloc(). | |
6623 * column: Zero based column of data being set. | |
6624 * row: Zero based row of data being set. | |
6625 * data: Pointer to the data to be added. | |
6626 */ | |
6627 void API dw_filesystem_change_file(HWND handle, int row, char *filename, unsigned long icon) | |
6628 { | |
6629 dw_container_change_item(handle, 0, row, (void *)&icon); | |
6630 dw_container_change_item(handle, 1, row, (void *)&filename); | |
6631 } | |
6632 | |
6633 /* | |
6605 * Sets an item in specified row and column to the given data. | 6634 * Sets an item in specified row and column to the given data. |
6606 * Parameters: | 6635 * Parameters: |
6607 * handle: Handle to the container window (widget). | 6636 * handle: Handle to the container window (widget). |
6608 * pointer: Pointer to the allocated memory in dw_container_alloc(). | 6637 * pointer: Pointer to the allocated memory in dw_container_alloc(). |
6609 * column: Zero based column of data being set. | 6638 * column: Zero based column of data being set. |