comparison mac/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
518 } 518 }
519 519
520 static int _dw_int_pos(HWND hwnd) 520 static int _dw_int_pos(HWND hwnd)
521 { 521 {
522 int pos = (int)dw_window_get_data(hwnd, "_dw_percent_value"); 522 int pos = (int)dw_window_get_data(hwnd, "_dw_percent_value");
523 int range = dw_percent_query_range(hwnd); 523 int range = dw_percent_get_range(hwnd);
524 float fpos = (float)pos; 524 float fpos = (float)pos;
525 float frange = (float)range; 525 float frange = (float)range;
526 float fnew = (fpos/1000.0)*frange; 526 float fnew = (fpos/1000.0)*frange;
527 return (int)fnew; 527 return (int)fnew;
528 } 528 }
529 529
530 static void _dw_int_set(HWND hwnd, int pos) 530 static void _dw_int_set(HWND hwnd, int pos)
531 { 531 {
532 int inew, range = dw_percent_query_range(hwnd); 532 int inew, range = dw_percent_get_range(hwnd);
533 if(range) 533 if(range)
534 { 534 {
535 float fpos = (float)pos; 535 float fpos = (float)pos;
536 float frange = (float)range; 536 float frange = (float)range;
537 float fnew = (fpos/frange)*1000.0; 537 float fnew = (fpos/frange)*1000.0;
931 * Changes the appearance of the mouse pointer. 931 * Changes the appearance of the mouse pointer.
932 * Parameters: 932 * Parameters:
933 * handle: Handle to widget for which to change. 933 * handle: Handle to widget for which to change.
934 * cursortype: ID of the pointer you want. 934 * cursortype: ID of the pointer you want.
935 */ 935 */
936 void API dw_window_pointer(HWND handle, int pointertype) 936 void API dw_window_set_pointer(HWND handle, int pointertype)
937 { 937 {
938 SetCursor(*GetCursor(pointertype)); 938 SetCursor(*GetCursor(pointertype));
939 } 939 }
940 940
941 /* 941 /*
1486 * Parameters: 1486 * Parameters:
1487 * handle: Window (widget) handle. 1487 * handle: Window (widget) handle.
1488 * width: New width in pixels. 1488 * width: New width in pixels.
1489 * height: New height in pixels. 1489 * height: New height in pixels.
1490 */ 1490 */
1491 void API dw_window_set_usize(HWND handle, ULONG width, ULONG height) 1491 void API dw_window_set_size(HWND handle, ULONG width, ULONG height)
1492 { 1492 {
1493 SizeWindow((WindowRef)handle, (short)width, (short)height, TRUE); 1493 SizeWindow((WindowRef)handle, (short)width, (short)height, TRUE);
1494 } 1494 }
1495 1495
1496 /* 1496 /*
1538 * height: Height of the widget. 1538 * height: Height of the widget.
1539 */ 1539 */
1540 void API dw_window_set_pos_size(HWND handle, ULONG x, ULONG y, ULONG width, ULONG height) 1540 void API dw_window_set_pos_size(HWND handle, ULONG x, ULONG y, ULONG width, ULONG height)
1541 { 1541 {
1542 dw_window_set_pos(handle, x, y); 1542 dw_window_set_pos(handle, x, y);
1543 dw_window_set_usize(handle, width, height); 1543 dw_window_set_size(handle, width, height);
1544 } 1544 }
1545 1545
1546 /* 1546 /*
1547 * Gets the position and size of a given window (widget). 1547 * Gets the position and size of a given window (widget).
1548 * Parameters: 1548 * Parameters:
1592 /* 1592 /*
1593 * Queries the currently visible page ID. 1593 * Queries the currently visible page ID.
1594 * Parameters: 1594 * Parameters:
1595 * handle: Handle to the notebook widget. 1595 * handle: Handle to the notebook widget.
1596 */ 1596 */
1597 unsigned long API dw_notebook_page_query(HWND handle) 1597 unsigned long API dw_notebook_page_get(HWND handle)
1598 { 1598 {
1599 return 0; 1599 return 0;
1600 } 1600 }
1601 1601
1602 /* 1602 /*
1687 * handle: Handle to the listbox to be queried. 1687 * handle: Handle to the listbox to be queried.
1688 * index: Index into the list to be queried. 1688 * index: Index into the list to be queried.
1689 * buffer: Buffer where text will be copied. 1689 * buffer: Buffer where text will be copied.
1690 * length: Length of the buffer (including NULL). 1690 * length: Length of the buffer (including NULL).
1691 */ 1691 */
1692 void API dw_listbox_query_text(HWND handle, unsigned int index, char *buffer, unsigned int length) 1692 void API dw_listbox_get_text(HWND handle, unsigned int index, char *buffer, unsigned int length)
1693 { 1693 {
1694 } 1694 }
1695 1695
1696 /* 1696 /*
1697 * Sets the text of a given listbox entry. 1697 * Sets the text of a given listbox entry.
1775 * Parameters: 1775 * Parameters:
1776 * handle: Handle to the MLE to be queried. 1776 * handle: Handle to the MLE to be queried.
1777 * bytes: A pointer to a variable to return the total bytes. 1777 * bytes: A pointer to a variable to return the total bytes.
1778 * lines: A pointer to a variable to return the number of lines. 1778 * lines: A pointer to a variable to return the number of lines.
1779 */ 1779 */
1780 void API dw_mle_query(HWND handle, unsigned long *bytes, unsigned long *lines) 1780 void API dw_mle_get_size(HWND handle, unsigned long *bytes, unsigned long *lines)
1781 { 1781 {
1782 } 1782 }
1783 1783
1784 /* 1784 /*
1785 * Deletes text from an MLE box. 1785 * Deletes text from an MLE box.
1805 * Sets the visible line of an MLE box. 1805 * Sets the visible line of an MLE box.
1806 * Parameters: 1806 * Parameters:
1807 * handle: Handle to the MLE to be positioned. 1807 * handle: Handle to the MLE to be positioned.
1808 * line: Line to be visible. 1808 * line: Line to be visible.
1809 */ 1809 */
1810 void API dw_mle_set_visible(HWND handle, int line) 1810 void API dw_mle_set_cursor_visible(HWND handle, int line)
1811 { 1811 {
1812 } 1812 }
1813 1813
1814 /* 1814 /*
1815 * Sets the editablity of an MLE box. 1815 * Sets the editablity of an MLE box.
1816 * Parameters: 1816 * Parameters:
1817 * handle: Handle to the MLE. 1817 * handle: Handle to the MLE.
1818 * state: TRUE if it can be edited, FALSE for readonly. 1818 * state: TRUE if it can be edited, FALSE for readonly.
1819 */ 1819 */
1820 void API dw_mle_set_editable(HWND handle, int state) 1820 void API dw_mle_set_cursor_editable(HWND handle, int state)
1821 { 1821 {
1822 } 1822 }
1823 1823
1824 /* 1824 /*
1825 * Sets the word wrap state of an MLE box. 1825 * Sets the word wrap state of an MLE box.
1826 * Parameters: 1826 * Parameters:
1827 * handle: Handle to the MLE. 1827 * handle: Handle to the MLE.
1828 * state: TRUE if it wraps, FALSE if it doesn't. 1828 * state: TRUE if it wraps, FALSE if it doesn't.
1829 */ 1829 */
1830 void API dw_mle_set_word_wrap(HWND handle, int state) 1830 void API dw_mle_set_cursor_word_wrap(HWND handle, int state)
1831 { 1831 {
1832 } 1832 }
1833 1833
1834 /* 1834 /*
1835 * Sets the current cursor position of an MLE box. 1835 * Sets the current cursor position of an MLE box.
1836 * Parameters: 1836 * Parameters:
1837 * handle: Handle to the MLE to be positioned. 1837 * handle: Handle to the MLE to be positioned.
1838 * point: Point to position cursor. 1838 * point: Point to position cursor.
1839 */ 1839 */
1840 void API dw_mle_set(HWND handle, int point) 1840 void API dw_mle_set_cursor(HWND handle, int point)
1841 { 1841 {
1842 } 1842 }
1843 1843
1844 /* 1844 /*
1845 * Finds text in an MLE box. 1845 * Finds text in an MLE box.
1875 /* 1875 /*
1876 * Returns the range of the percent bar. 1876 * Returns the range of the percent bar.
1877 * Parameters: 1877 * Parameters:
1878 * handle: Handle to the percent bar to be queried. 1878 * handle: Handle to the percent bar to be queried.
1879 */ 1879 */
1880 unsigned int API dw_percent_query_range(HWND handle) 1880 unsigned int API dw_percent_get_range(HWND handle)
1881 { 1881 {
1882 return 0; 1882 return 0;
1883 } 1883 }
1884 1884
1885 /* 1885 /*
1895 /* 1895 /*
1896 * Returns the position of the slider. 1896 * Returns the position of the slider.
1897 * Parameters: 1897 * Parameters:
1898 * handle: Handle to the slider to be queried. 1898 * handle: Handle to the slider to be queried.
1899 */ 1899 */
1900 unsigned int API dw_slider_query_pos(HWND handle) 1900 unsigned int API dw_slider_get_pos(HWND handle)
1901 { 1901 {
1902 return 0; 1902 return 0;
1903 } 1903 }
1904 1904
1905 /* 1905 /*
1915 /* 1915 /*
1916 * Returns the position of the scrollbar. 1916 * Returns the position of the scrollbar.
1917 * Parameters: 1917 * Parameters:
1918 * handle: Handle to the scrollbar to be queried. 1918 * handle: Handle to the scrollbar to be queried.
1919 */ 1919 */
1920 unsigned int API dw_scrollbar_query_pos(HWND handle) 1920 unsigned int API dw_scrollbar_get_pos(HWND handle)
1921 { 1921 {
1922 return 0; 1922 return 0;
1923 } 1923 }
1924 1924
1925 /* 1925 /*
1978 /* 1978 /*
1979 * Returns the current value of the spinbutton. 1979 * Returns the current value of the spinbutton.
1980 * Parameters: 1980 * Parameters:
1981 * handle: Handle to the spinbutton to be queried. 1981 * handle: Handle to the spinbutton to be queried.
1982 */ 1982 */
1983 long API dw_spinbutton_query(HWND handle) 1983 long API dw_spinbutton_get_pos(HWND handle)
1984 { 1984 {
1985 return 0; 1985 return 0;
1986 } 1986 }
1987 1987
1988 /* 1988 /*
1989 * Returns the state of the checkbox. 1989 * Returns the state of the checkbox.
1990 * Parameters: 1990 * Parameters:
1991 * handle: Handle to the checkbox to be queried. 1991 * handle: Handle to the checkbox to be queried.
1992 */ 1992 */
1993 int API dw_checkbox_query(HWND handle) 1993 int API dw_checkbox_get(HWND handle)
1994 { 1994 {
1995 return 0; 1995 return 0;
1996 } 1996 }
1997 1997
1998 /* 1998 /*
2040 * handle: Handle to the tree containing the item. 2040 * handle: Handle to the tree containing the item.
2041 * item: Handle of the item to be modified. 2041 * item: Handle of the item to be modified.
2042 * title: The text title of the entry. 2042 * title: The text title of the entry.
2043 * icon: Handle to coresponding icon. 2043 * icon: Handle to coresponding icon.
2044 */ 2044 */
2045 void API dw_tree_set(HWND handle, HTREEITEM item, char *title, unsigned long icon) 2045 void API dw_tree_item_change(HWND handle, HTREEITEM item, char *title, unsigned long icon)
2046 { 2046 {
2047 } 2047 }
2048 2048
2049 /* 2049 /*
2050 * Sets the item data of a tree item. 2050 * Sets the item data of a tree item.
2051 * Parameters: 2051 * Parameters:
2052 * handle: Handle to the tree containing the item. 2052 * handle: Handle to the tree containing the item.
2053 * item: Handle of the item to be modified. 2053 * item: Handle of the item to be modified.
2054 * itemdata: User defined data to be associated with item. 2054 * itemdata: User defined data to be associated with item.
2055 */ 2055 */
2056 void API dw_tree_set_data(HWND handle, HTREEITEM item, void *itemdata) 2056 void API dw_tree_item_change_data(HWND handle, HTREEITEM item, void *itemdata)
2057 { 2057 {
2058 } 2058 }
2059 2059
2060 /* 2060 /*
2061 * Gets the item data of a tree item. 2061 * Gets the item data of a tree item.
2062 * Parameters: 2062 * Parameters:
2063 * handle: Handle to the tree containing the item. 2063 * handle: Handle to the tree containing the item.
2064 * item: Handle of the item to be modified. 2064 * item: Handle of the item to be modified.
2065 */ 2065 */
2066 void * API dw_tree_get_data(HWND handle, HTREEITEM item) 2066 void * API dw_tree_item_get_data(HWND handle, HTREEITEM item)
2067 { 2067 {
2068 return NULL; 2068 return NULL;
2069 } 2069 }
2070 2070
2071 /* 2071 /*
2091 * Expands a node on a tree. 2091 * Expands a node on a tree.
2092 * Parameters: 2092 * Parameters:
2093 * handle: Handle to the tree window (widget). 2093 * handle: Handle to the tree window (widget).
2094 * item: Handle to node to be expanded. 2094 * item: Handle to node to be expanded.
2095 */ 2095 */
2096 void API dw_tree_expand(HWND handle, HTREEITEM item) 2096 void API dw_tree_item_expand(HWND handle, HTREEITEM item)
2097 { 2097 {
2098 } 2098 }
2099 2099
2100 /* 2100 /*
2101 * Collapses a node on a tree. 2101 * Collapses a node on a tree.
2102 * Parameters: 2102 * Parameters:
2103 * handle: Handle to the tree window (widget). 2103 * handle: Handle to the tree window (widget).
2104 * item: Handle to node to be collapsed. 2104 * item: Handle to node to be collapsed.
2105 */ 2105 */
2106 void API dw_tree_collapse(HWND handle, HTREEITEM item) 2106 void API dw_tree_item_collapse(HWND handle, HTREEITEM item)
2107 { 2107 {
2108 } 2108 }
2109 2109
2110 /* 2110 /*
2111 * Removes a node from a tree. 2111 * Removes a node from a tree.
2112 * Parameters: 2112 * Parameters:
2113 * handle: Handle to the window (widget) to be cleared. 2113 * handle: Handle to the window (widget) to be cleared.
2114 * item: Handle to node to be deleted. 2114 * item: Handle to node to be deleted.
2115 */ 2115 */
2116 void API dw_tree_delete(HWND handle, HTREEITEM item) 2116 void API dw_tree_item_delete(HWND handle, HTREEITEM item)
2117 { 2117 {
2118 } 2118 }
2119 2119
2120 /* 2120 /*
2121 * Sets up the container columns. 2121 * Sets up the container columns.