annotate template/dw.c @ 2929:2ab97b349958

C++: Add Page 3 - Tree to dwtestoo.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 30 Dec 2022 09:35:00 +0000
parents 3fe7641f027c
children edb4307ac7ce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2 * Dynamic Windows:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3 * A GTK like GUI implementation template.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
4 *
2751
ee1cfa7d645e Update copyright dates for the new year 2022.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2740
diff changeset
5 * (C) 2011-2022 Brian Smith <brian@dbsoft.org>
ee1cfa7d645e Update copyright dates for the new year 2022.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2740
diff changeset
6 * (C) 2011-2022 Mark Hessling <mark@rexx.org>
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
7 *
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
8 * Compile with $CC -I. -D__TEMPLATE__ template/dw.c
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
9 *
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
10 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
11
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
12 #include "dw.h"
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
13 #include <stdlib.h>
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
14 #include <string.h>
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
15
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
16 /* Implement these to get and set the Box* pointer on the widget handle */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
17 void *_dw_window_pointer_get(HWND handle)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
18 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
19 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
20 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
21
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
22 void _dw_window_pointer_set(HWND handle, Box *box)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
23 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
24 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
25
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
26 /* This function calculates how much space the widgets and boxes require
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
27 * and does expansion as necessary.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
28 */
2386
47b214db2465 Add _dw to the internal functions in the template source.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2355
diff changeset
29 static void _dw_resize_box(Box *thisbox, int *depth, int x, int y, int pass)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
30 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
31 /* Current item position */
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
32 int z, currentx = thisbox->pad, currenty = thisbox->pad;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
33 /* Used x, y and padding maximum values...
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
34 * These will be used to find the widest or
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
35 * tallest items in a box.
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
36 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
37 int uymax = 0, uxmax = 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
38 int upymax = 0, upxmax = 0;
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
39
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
40 /* Reset the box sizes */
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
41 thisbox->minwidth = thisbox->minheight = thisbox->usedpadx = thisbox->usedpady = thisbox->pad * 2;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
42
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
43 #if 0
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
44 /* If there are containers which have built-in padding like
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
45 * groupboxes.. calculate the padding size and add it to the layout.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
46 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
47 if(thisbox->grouphwnd)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
48 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
49 char *text = dw_window_get_text(thisbox->grouphwnd);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
50
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
51 thisbox->grouppady = 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
52
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
53 if(text)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
54 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
55 dw_font_text_extents_get(thisbox->grouphwnd, 0, text, NULL, &thisbox->grouppady);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
56 dw_free(text);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
57 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
58
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
59 if(thisbox->grouppady)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
60 thisbox->grouppady += 3;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
61 else
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
62 thisbox->grouppady = 6;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
63
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
64 thisbox->grouppadx = 6;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
65
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
66 thisbox->minwidth += thisbox->grouppadx;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
67 thisbox->usedpadx += thisbox->grouppadx;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
68 thisbox->minheight += thisbox->grouppady;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
69 thisbox->usedpady += thisbox->grouppady;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
70 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
71 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
72
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
73 /* Count up all the space for all items in the box */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
74 for(z=0;z<thisbox->count;z++)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
75 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
76 int itempad, itemwidth, itemheight;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
77
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
78 if(thisbox->items[z].type == _DW_TYPE_BOX)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
79 {
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
80 Box *tmp = (Box *)_dw_window_pointer_get(thisbox->items[z].hwnd);
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
81
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
82 if(tmp)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
83 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
84 /* On the first pass calculate the box contents */
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
85 if(pass == 1)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
86 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
87 (*depth)++;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
88
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
89 /* Save the newly calculated values on the box */
2386
47b214db2465 Add _dw to the internal functions in the template source.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2355
diff changeset
90 _dw_resize_box(tmp, depth, x, y, pass);
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
91
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
92 /* Duplicate the values in the item list for use below */
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
93 thisbox->items[z].width = tmp->minwidth;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
94 thisbox->items[z].height = tmp->minheight;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
95
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
96 (*depth)--;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
97 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
98 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
99 }
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
100
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
101 /* Precalculate these values, since they will
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
102 * be used used repeatedly in the next section.
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
103 */
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
104 itempad = thisbox->items[z].pad * 2;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
105 itemwidth = thisbox->items[z].width + itempad;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
106 itemheight = thisbox->items[z].height + itempad;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
107
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
108 /* Calculate the totals and maximums */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
109 if(thisbox->type == DW_VERT)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
110 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
111 if(itemwidth > uxmax)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
112 uxmax = itemwidth;
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
113
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
114 if(thisbox->items[z].hsize != _DW_SIZE_EXPAND)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
115 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
116 if(itemwidth > upxmax)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
117 upxmax = itemwidth;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
118 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
119 else
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
120 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
121 if(itempad > upxmax)
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
122 upxmax = itempad;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
123 }
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
124 thisbox->minheight += itemheight;
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
125 if(thisbox->items[z].vsize != _DW_SIZE_EXPAND)
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
126 thisbox->usedpady += itemheight;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
127 else
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
128 thisbox->usedpady += itempad;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
129 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
130 else
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
131 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
132 if(itemheight > uymax)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
133 uymax = itemheight;
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
134 if(thisbox->items[z].vsize != _DW_SIZE_EXPAND)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
135 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
136 if(itemheight > upymax)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
137 upymax = itemheight;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
138 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
139 else
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
140 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
141 if(itempad > upymax)
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
142 upymax = itempad;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
143 }
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
144 thisbox->minwidth += itemwidth;
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
145 if(thisbox->items[z].hsize != _DW_SIZE_EXPAND)
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
146 thisbox->usedpadx += itemwidth;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
147 else
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
148 thisbox->usedpadx += itempad;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
149 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
150 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
151
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
152 /* Add the maximums which were calculated in the previous loop */
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
153 thisbox->minwidth += uxmax;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
154 thisbox->minheight += uymax;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
155 thisbox->usedpadx += upxmax;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
156 thisbox->usedpady += upymax;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
157
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
158 /* Move the groupbox start past the group border */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
159 if(thisbox->grouphwnd)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
160 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
161 currentx += 3;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
162 currenty += thisbox->grouppady - 3;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
163 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
164
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
165 /* The second pass is for actual placement. */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
166 if(pass > 1)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
167 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
168 for(z=0;z<(thisbox->count);z++)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
169 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
170 int height = thisbox->items[z].height;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
171 int width = thisbox->items[z].width;
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
172 int itempad = thisbox->items[z].pad * 2;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
173 int thispad = thisbox->pad * 2;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
174
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
175 /* Calculate the new sizes */
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
176 if(thisbox->items[z].hsize == _DW_SIZE_EXPAND)
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
177 {
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
178 if(thisbox->type == DW_HORZ)
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
179 {
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
180 int expandablex = thisbox->minwidth - thisbox->usedpadx;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
181
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
182 if(expandablex)
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
183 width = (int)(((float)width / (float)expandablex) * (float)(x - thisbox->usedpadx));
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
184 }
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
185 else
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
186 width = x - (itempad + thispad + thisbox->grouppadx);
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
187 }
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
188 if(thisbox->items[z].vsize == _DW_SIZE_EXPAND)
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
189 {
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
190 if(thisbox->type == DW_VERT)
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
191 {
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
192 int expandabley = thisbox->minheight - thisbox->usedpady;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
193
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
194 if(expandabley)
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
195 height = (int)(((float)height / (float)expandabley) * (float)(y - thisbox->usedpady));
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
196 }
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
197 else
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
198 height = y - (itempad + thispad + thisbox->grouppady);
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
199 }
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
200
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
201 /* If the calculated size is valid... */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
202 if(width > 0 && height > 0)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
203 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
204 int pad = thisbox->items[z].pad;
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
205 #if 0
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
206 HWND handle = thisbox->items[z].hwnd;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
207
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
208 /* Here you put your platform specific placement widget placement code */
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
209 PlaceWidget(handle, currentx + pad, currenty + pad, width, height);
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
210
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
211 /* If any special handling needs to be done... like diving into
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
212 * controls that have sub-layouts... like notebooks or splitbars...
2386
47b214db2465 Add _dw to the internal functions in the template source.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2355
diff changeset
213 * do that here. Figure out the sub-layout size and call _dw_do_resize().
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
214 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
215 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
216
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
217 /* Advance the current position in the box */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
218 if(thisbox->type == DW_HORZ)
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
219 currentx += width + (pad * 2);
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
220 if(thisbox->type == DW_VERT)
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
221 currenty += height + (pad * 2);
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
222 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
223 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
224 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
225 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
226
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
227 /* This is a convenience function used in the window's resize event
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
228 * to relayout the controls in the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
229 */
2386
47b214db2465 Add _dw to the internal functions in the template source.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2355
diff changeset
230 void _dw_do_resize(Box *thisbox, int x, int y)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
231 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
232 if(x != 0 && y != 0)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
233 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
234 if(thisbox)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
235 {
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
236 int depth = 0;
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
237
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
238 /* Calculate space requirements */
2386
47b214db2465 Add _dw to the internal functions in the template source.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2355
diff changeset
239 _dw_resize_box(thisbox, &depth, x, y, 1);
1441
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
240
b9577d1f0411 Removed some debug code on Windows and updated the layout code in the template.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1429
diff changeset
241 /* Finally place all the boxes and controls */
2386
47b214db2465 Add _dw to the internal functions in the template source.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2355
diff changeset
242 _dw_resize_box(thisbox, &depth, x, y, 2);
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
243 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
244 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
245 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
246
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
247 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
248 * Runs a message loop for Dynamic Windows.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
249 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
250 void API dw_main(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
251 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
252 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
253
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
254 /*
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
255 * Causes running dw_main() to return.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
256 */
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
257 void API dw_main_quit(void)
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
258 {
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
259 }
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
260
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
261 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
262 * Runs a message loop for Dynamic Windows, for a period of milliseconds.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
263 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
264 * milliseconds: Number of milliseconds to run the loop for.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
265 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
266 void API dw_main_sleep(int milliseconds)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
267 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
268 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
269
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
270 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
271 * Processes a single message iteration and returns.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
272 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
273 void API dw_main_iteration(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
274 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
275 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
276
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
277 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
278 * Cleanly terminates a DW session, should be signal handler safe.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
279 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
280 * exitcode: Exit code reported to the operating system.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
281 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
282 void API dw_exit(int exitcode)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
283 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
284 exit(exitcode);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
285 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
286
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
287 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
288 * Free's memory allocated by dynamic windows.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
289 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
290 * ptr: Pointer to dynamic windows allocated
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
291 * memory to be free()'d.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
292 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
293 void API dw_free(void *ptr)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
294 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
295 free(ptr);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
296 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
297
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
298 /*
1007
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
299 * Returns a pointer to a static buffer which contains the
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
300 * current user directory. Or the root directory if it could
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
301 * not be determined.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
302 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
303 char * API dw_user_dir(void)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
304 {
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
305 static char _dw_user_dir[MAX_PATH+1] = {0};
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
306
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
307 if(!_dw_user_dir[0])
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
308 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
309 char *home = getenv("HOME");
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
310
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
311 if(home)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
312 strcpy(_dw_user_dir, home);
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
313 else
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
314 strcpy(_dw_user_dir, "/");
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
315 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
316 return _dw_user_dir;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
317 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
318
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
319 /*
1384
156e32814c83 Cleanup of the previous commits and added Unix support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1371
diff changeset
320 * Returns a pointer to a static buffer which containes the
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
321 * private application data directory.
1384
156e32814c83 Cleanup of the previous commits and added Unix support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1371
diff changeset
322 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
323 char * API dw_app_dir(void)
1384
156e32814c83 Cleanup of the previous commits and added Unix support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1371
diff changeset
324 {
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
325 static char _dw_exec_dir[MAX_PATH+1] = {0};
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
326 /* Code to determine the execution directory here,
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
327 * some implementations make this variable global
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
328 * and determin the location in dw_init().
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
329 */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
330 return _dw_exec_dir;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
331 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
332
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
333 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
334 * Sets the application ID used by this Dynamic Windows application instance.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
335 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
336 * appid: A string typically in the form: com.company.division.application
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
337 * appname: The application name used on Windows or NULL.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
338 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
339 * DW_ERROR_NONE after successfully setting the application ID.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
340 * DW_ERROR_UNKNOWN if unsupported on this system.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
341 * DW_ERROR_GENERAL if the application ID is not allowed.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
342 * Remarks:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
343 * This must be called before dw_init(). If dw_init() is called first
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
344 * it will create a unique ID in the form: org.dbsoft.dwindows.application
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
345 * or if the application name cannot be detected: org.dbsoft.dwindows.pid.#
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
346 * The appname is only required on Windows. If NULL is passed the detected
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
347 * application name will be used, but a prettier name may be desired.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
348 */
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
349 int API dw_app_id_set(const char *appid, const char *appname)
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
350 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
351 return DW_ERROR_UNKNOWN;
1384
156e32814c83 Cleanup of the previous commits and added Unix support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1371
diff changeset
352 }
156e32814c83 Cleanup of the previous commits and added Unix support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1371
diff changeset
353
156e32814c83 Cleanup of the previous commits and added Unix support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1371
diff changeset
354 /*
1306
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
355 * Displays a debug message on the console...
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
356 * Parameters:
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
357 * format: printf style format string.
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
358 * ...: Additional variables for use in the format.
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
359 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
360 void API dw_debug(const char *format, ...)
1306
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
361 {
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
362 va_list args;
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
363
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
364 va_start(args, format);
2906
9d6280f206bd Minor code cleanups in the template and C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2901
diff changeset
365 dw_vdebug(format, args);
1306
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
366 va_end(args);
2901
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
367 }
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
368
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
369 void API dw_vdebug(const char *format, va_list args)
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
370 {
2906
9d6280f206bd Minor code cleanups in the template and C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2901
diff changeset
371 /* Output to stderr, if there is another way to send it
9d6280f206bd Minor code cleanups in the template and C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2901
diff changeset
372 * on the implementation platform, change this.
9d6280f206bd Minor code cleanups in the template and C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2901
diff changeset
373 */
2901
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
374 vfprintf(stderr, format, args);
1306
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
375 }
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
376
dbd507f42947 Added dw_debug() logging function which will output a message to the debugging console.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1291
diff changeset
377 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
378 * Displays a Message Box with given text and title..
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
379 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
380 * title: The title of the message box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
381 * flags: flags to indicate buttons and icon
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
382 * format: printf style format string.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
383 * ...: Additional variables for use in the format.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
384 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
385 * DW_MB_RETURN_YES, DW_MB_RETURN_NO, DW_MB_RETURN_OK,
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
386 * or DW_MB_RETURN_CANCEL based on flags and user response.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
387 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
388 int API dw_messagebox(const char *title, int flags, const char *format, ...)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
389 {
2901
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
390 va_list args;
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
391 int rc;
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
392
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
393 va_start(args, format);
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
394 rc = dw_vmessagebox(title, flags, format, args);
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
395 va_end(args);
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
396 return rc;
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
397 }
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
398
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
399 int API dw_vmessagebox(const char *title, int flags, const char *format, va_list args)
761b7a12b079 Add va_list versions of dw_debug() and dw_messagebox() for use in C++ bindings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2852
diff changeset
400 {
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
401 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
402 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
403
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
404 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
405 * Opens a file dialog and queries user selection.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
406 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
407 * title: Title bar text for dialog.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
408 * defpath: The default path of the open dialog.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
409 * ext: Default file extention.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
410 * flags: DW_FILE_OPEN or DW_FILE_SAVE.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
411 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
412 * NULL on error. A malloced buffer containing
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
413 * the file path on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
414 *
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
415 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
416 char * API dw_file_browse(const char *title, const char *defpath, const char *ext, int flags)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
417 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
418 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
419 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
420
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
421 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
422 * Gets the contents of the default clipboard as text.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
423 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
424 * None.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
425 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
426 * Pointer to an allocated string of text or NULL if clipboard empty or contents could not
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
427 * be converted to text.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
428 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
429 char * API dw_clipboard_get_text()
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
430 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
431 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
432 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
433
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
434 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
435 * Sets the contents of the default clipboard to the supplied text.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
436 * Parameters:
1007
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
437 * str: Text to put on the clipboard.
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
438 * len: Length of the text.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
439 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
440 void API dw_clipboard_set_text(const char *str, int len)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
441 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
442 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
443
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
444
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
445 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
446 * Allocates and initializes a dialog struct.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
447 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
448 * data: User defined data to be passed to functions.
1007
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
449 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
450 * A handle to a dialog or NULL on failure.
1007
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
451 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
452 DWDialog * API dw_dialog_new(void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
453 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
454 #if 0
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
455 DWDialog *tmp = malloc(sizeof(DWDialog));
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
456
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
457 if(tmp)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
458 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
459 tmp->eve = dw_event_new();
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
460 dw_event_reset(tmp->eve);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
461 tmp->data = data;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
462 tmp->done = FALSE;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
463 tmp->result = NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
464 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
465 return tmp;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
466 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
467 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
468 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
469
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
470 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
471 * Accepts a dialog struct and returns the given data to the
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
472 * initial called of dw_dialog_wait().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
473 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
474 * dialog: Pointer to a dialog struct aquired by dw_dialog_new).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
475 * result: Data to be returned by dw_dialog_wait().
1007
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
476 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
477 * DW_ERROR_NONE (0) on success.
1007
870a95961b4a Fix some of the documentation comments.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 988
diff changeset
478 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
479 int API dw_dialog_dismiss(DWDialog *dialog, void *result)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
480 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
481 #if 0
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
482 dialog->result = result;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
483 dw_event_post(dialog->eve);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
484 dialog->done = TRUE;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
485 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
486 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
487 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
488
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
489 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
490 * Accepts a dialog struct waits for dw_dialog_dismiss() to be
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
491 * called by a signal handler with the given dialog struct.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
492 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
493 * dialog: Pointer to a dialog struct aquired by dw_dialog_new).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
494 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
495 * The data passed to dw_dialog_dismiss().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
496 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
497 void * API dw_dialog_wait(DWDialog *dialog)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
498 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
499 void *tmp = NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
500
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
501 #if 0
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
502 while(!dialog->done)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
503 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
504 dw_main_iteration();
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
505 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
506 dw_event_close(&dialog->eve);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
507 tmp = dialog->result;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
508 free(dialog);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
509 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
510 return tmp;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
511 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
512
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
513 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
514 * Create a new Box to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
515 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
516 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
517 * pad: Number of pixels to pad around the box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
518 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
519 * A handle to a box or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
520 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
521 HWND API dw_box_new(int type, int pad)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
522 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
523 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
524 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
525
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
526 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
527 * Create a new Group Box to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
528 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
529 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
530 * pad: Number of pixels to pad around the box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
531 * title: Text to be displayined in the group outline.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
532 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
533 * A handle to a groupbox window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
534 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
535 HWND API dw_groupbox_new(int type, int pad, const char *title)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
536 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
537 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
538 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
539
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
540 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
541 * Create a new scrollable Box to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
542 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
543 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
544 * pad: Number of pixels to pad around the box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
545 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
546 * A handle to a scrollbox or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
547 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
548 HWND API dw_scrollbox_new( int type, int pad )
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
549 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
550 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
551 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
552
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
553 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
554 * Returns the position of the scrollbar in the scrollbox.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
555 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
556 * handle: Handle to the scrollbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
557 * orient: The vertical or horizontal scrollbar.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
558 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
559 * The vertical or horizontal position in the scrollbox.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
560 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
561 int API dw_scrollbox_get_pos(HWND handle, int orient)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
562 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
563 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
564 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
565
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
566 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
567 * Gets the range for the scrollbar in the scrollbox.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
568 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
569 * handle: Handle to the scrollbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
570 * orient: The vertical or horizontal scrollbar.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
571 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
572 * The vertical or horizontal range of the scrollbox.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
573 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
574 int API dw_scrollbox_get_range(HWND handle, int orient)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
575 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
576 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
577 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
578
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
579 /* Internal box packing function called by the other 3 functions */
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
580 void _dw_box_pack(HWND box, HWND item, int index, int width, int height, int hsize, int vsize, int pad, char *funcname)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
581 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
582 Box *thisbox;
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
583 int z, x = 0;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
584 Item *tmpitem, *thisitem;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
585
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
586 /* Sanity checks */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
587 if(!box || box == item)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
588 return;
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
589
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
590 thisbox = _dw_window_pointer_get(box);
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
591 thisitem = thisbox->items;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
592
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
593 /* Do some sanity bounds checking */
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
594 if(index < 0)
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
595 index = 0;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
596 if(index > thisbox->count)
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
597 index = thisbox->count;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
598
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
599 /* Duplicate the existing data */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
600 tmpitem = malloc(sizeof(Item)*(thisbox->count+1));
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
601
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
602 for(z=0;z<thisbox->count;z++)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
603 {
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
604 if(z == index)
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
605 x++;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
606 tmpitem[x] = thisitem[z];
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
607 x++;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
608 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
609
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
610 /* Sanity checks */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
611 if(vsize && !height)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
612 height = 1;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
613 if(hsize && !width)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
614 width = 1;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
615
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
616 /* Fill in the item data appropriately */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
617 if(0 /* Test to see if "item" is a box */)
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
618 tmpitem[index].type = _DW_TYPE_BOX;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
619 else
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
620 tmpitem[index].type = _DW_TYPE_ITEM;
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
621
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
622 tmpitem[index].hwnd = item;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
623 tmpitem[index].origwidth = tmpitem[index].width = width;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
624 tmpitem[index].origheight = tmpitem[index].height = height;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
625 tmpitem[index].pad = pad;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
626 if(hsize)
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
627 tmpitem[index].hsize = _DW_SIZE_EXPAND;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
628 else
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
629 tmpitem[index].hsize = _DW_SIZE_STATIC;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
630
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
631 if(vsize)
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
632 tmpitem[index].vsize = _DW_SIZE_EXPAND;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
633 else
2740
9be24001d288 Style update. Add DW_SIZE_AUTO (-1) for passing automatic sizing to packing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2584
diff changeset
634 tmpitem[index].vsize = _DW_SIZE_STATIC;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
635
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
636 thisbox->items = tmpitem;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
637
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
638 /* Update the item count */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
639 thisbox->count++;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
640
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
641 /* Add the item to the box */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
642 #if 0
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
643 /* Platform specific code to add item to box */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
644 BoxAdd(box, item);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
645 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
646
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
647 /* Free the old data */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
648 if(thisbox->count)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
649 free(thisitem);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
650 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
651
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
652 /*
1667
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
653 * Remove windows (widgets) from the box they are packed into.
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
654 * Parameters:
1679
e19b93a8229b More comment cleanups.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1669
diff changeset
655 * handle: Window handle of the packed item to be removed.
1667
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
656 * Returns:
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
657 * DW_ERROR_NONE on success and DW_ERROR_GENERAL on failure.
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
658 */
1769
d81bebc5c8cc Mark and I decided to change dw_box_remove*() to dw_box_unpack*() for consistency.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1749
diff changeset
659 int API dw_box_unpack(HWND handle)
1667
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
660 {
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
661 return DW_ERROR_GENERAL;
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
662 }
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
663
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
664 /*
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
665 * Remove windows (widgets) from a box at an arbitrary location.
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
666 * Parameters:
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
667 * box: Window handle of the box to be removed from.
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
668 * index: 0 based index of packed items.
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
669 * Returns:
1679
e19b93a8229b More comment cleanups.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1669
diff changeset
670 * Handle to the removed item on success, 0 on failure or padding.
1667
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
671 */
1769
d81bebc5c8cc Mark and I decided to change dw_box_remove*() to dw_box_unpack*() for consistency.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1749
diff changeset
672 HWND API dw_box_unpack_at_index(HWND box, int index)
1667
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
673 {
1669
36a090da4cb1 Initial implementation of dw_box_remove() for GTK2/3 and stub for dw_box_remove_at_index().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1667
diff changeset
674 return 0;
1667
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
675 }
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
676
9dbd2984c1e5 Initial implementation of dw_box_remove() and dw_box_remove_at_index()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1556
diff changeset
677 /*
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
678 * Pack windows (widgets) into a box at an arbitrary location.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
679 * Parameters:
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
680 * box: Window handle of the box to be packed into.
1679
e19b93a8229b More comment cleanups.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1669
diff changeset
681 * item: Window handle of the item to pack.
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
682 * index: 0 based index of packed items.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
683 * width: Width in pixels of the item or -1 to be self determined.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
684 * height: Height in pixels of the item or -1 to be self determined.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
685 * hsize: TRUE if the window (widget) should expand horizontally to fill space given.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
686 * vsize: TRUE if the window (widget) should expand vertically to fill space given.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
687 * pad: Number of pixels of padding around the item.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
688 */
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
689 void API dw_box_pack_at_index(HWND box, HWND item, int index, int width, int height, int hsize, int vsize, int pad)
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
690 {
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
691 _dw_box_pack(box, item, index, width, height, hsize, vsize, pad, "dw_box_pack_at_index()");
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
692 }
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
693
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
694 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
695 * Pack windows (widgets) into a box from the start (or top).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
696 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
697 * box: Window handle of the box to be packed into.
1679
e19b93a8229b More comment cleanups.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1669
diff changeset
698 * item: Window handle of the item to pack.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
699 * width: Width in pixels of the item or -1 to be self determined.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
700 * height: Height in pixels of the item or -1 to be self determined.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
701 * hsize: TRUE if the window (widget) should expand horizontally to fill space given.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
702 * vsize: TRUE if the window (widget) should expand vertically to fill space given.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
703 * pad: Number of pixels of padding around the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
704 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
705 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
706 {
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
707 /* 65536 is the table limit on GTK...
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
708 * seems like a high enough value we will never hit it here either.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
709 */
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
710 _dw_box_pack(box, item, 65536, width, height, hsize, vsize, pad, "dw_box_pack_start()");
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
711 }
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
712
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
713 /*
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
714 * Pack windows (widgets) into a box from the end (or bottom).
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
715 * Parameters:
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
716 * box: Window handle of the box to be packed into.
1679
e19b93a8229b More comment cleanups.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1669
diff changeset
717 * item: Window handle of the item to pack.
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
718 * width: Width in pixels of the item or -1 to be self determined.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
719 * height: Height in pixels of the item or -1 to be self determined.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
720 * hsize: TRUE if the window (widget) should expand horizontally to fill space given.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
721 * vsize: TRUE if the window (widget) should expand vertically to fill space given.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
722 * pad: Number of pixels of padding around the item.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
723 */
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
724 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
725 {
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
726 _dw_box_pack(box, item, 0, width, height, hsize, vsize, pad, "dw_box_pack_end()");
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
727 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
728
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
729 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
730 * Create a new button window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
731 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
732 * text: The text to be display by the static text widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
733 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
734 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
735 * A handle to a button window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
736 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
737 HWND API dw_button_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
738 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
739 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
740 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
741
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
742 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
743 * Create a new Entryfield window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
744 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
745 * text: The default text to be in the entryfield widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
746 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
747 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
748 * A handle to an entryfield window or NULL on failure.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
749 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
750 HWND API dw_entryfield_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
751 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
752 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
753 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
754
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
755 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
756 * Create a new Entryfield (password) window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
757 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
758 * text: The default text to be in the entryfield widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
759 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
760 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
761 * A handle to an entryfield password window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
762 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
763 HWND API dw_entryfield_password_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
764 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
765 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
766 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
767
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
768 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
769 * Sets the entryfield character limit.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
770 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
771 * handle: Handle to the spinbutton to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
772 * limit: Number of characters the entryfield will take.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
773 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
774 void API dw_entryfield_set_limit(HWND handle, ULONG limit)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
775 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
776 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
777
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
778 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
779 * Create a new bitmap button window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
780 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
781 * text: Bubble help text to be displayed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
782 * id: An ID of a bitmap in the resource file.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
783 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
784 * A handle to a bitmap button window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
785 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
786 HWND API dw_bitmapbutton_new(const char *text, ULONG resid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
787 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
788 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
789 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
790
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
791 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
792 * Create a new bitmap button window (widget) to be packed from a file.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
793 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
794 * text: Bubble help text to be displayed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
795 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
796 * filename: Name of the file, omit extention to have
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
797 * DW pick the appropriate file extension.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
798 * (BMP on OS/2 or Windows, XPM on Unix)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
799 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
800 * A handle to a bitmap button window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
801 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
802 HWND API dw_bitmapbutton_new_from_file(const char *text, unsigned long cid, const char *filename)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
803 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
804 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
805 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
806
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
807 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
808 * Create a new bitmap button window (widget) to be packed from data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
809 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
810 * text: Bubble help text to be displayed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
811 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
812 * data: The contents of the image
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
813 * (BMP or ICO on OS/2 or Windows, XPM on Unix)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
814 * len: length of str
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
815 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
816 * A handle to a bitmap button window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
817 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
818 HWND API dw_bitmapbutton_new_from_data(const char *text, unsigned long cid, const char *data, int len)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
819 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
820 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
821 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
822
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
823 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
824 * Create a new spinbutton window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
825 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
826 * text: The text to be display by the static text widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
827 * id: An ID to be used with dw_window_from_id() or 0L.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
828 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
829 * A handle to a spinbutton window or NULL on failure.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
830 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
831 HWND API dw_spinbutton_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
832 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
833 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
834 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
835
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
836 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
837 * Sets the spinbutton value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
838 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
839 * handle: Handle to the spinbutton to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
840 * position: Current value of the spinbutton.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
841 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
842 void API dw_spinbutton_set_pos(HWND handle, long position)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
843 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
844 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
845
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
846 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
847 * Sets the spinbutton limits.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
848 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
849 * handle: Handle to the spinbutton to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
850 * upper: Upper limit.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
851 * lower: Lower limit.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
852 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
853 void API dw_spinbutton_set_limits(HWND handle, long upper, long lower)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
854 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
855 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
856
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
857 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
858 * Returns the current value of the spinbutton.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
859 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
860 * handle: Handle to the spinbutton to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
861 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
862 * Number value displayed in the spinbutton.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
863 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
864 long API dw_spinbutton_get_pos(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
865 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
866 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
867 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
868
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
869 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
870 * Create a new radiobutton window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
871 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
872 * text: The text to be display by the static text widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
873 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
874 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
875 * A handle to a radio button window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
876 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
877 HWND API dw_radiobutton_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
878 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
879 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
880 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
881
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
882 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
883 * Create a new slider window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
884 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
885 * vertical: TRUE or FALSE if slider is vertical.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
886 * increments: Number of increments available.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
887 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
888 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
889 * A handle to a slider window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
890 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
891 HWND API dw_slider_new(int vertical, int increments, ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
892 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
893 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
894 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
895
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
896 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
897 * Returns the position of the slider.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
898 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
899 * handle: Handle to the slider to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
900 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
901 * Position of the slider in the set range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
902 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
903 unsigned int API dw_slider_get_pos(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
904 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
905 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
906 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
907
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
908 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
909 * Sets the slider position.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
910 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
911 * handle: Handle to the slider to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
912 * position: Position of the slider withing the range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
913 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
914 void API dw_slider_set_pos(HWND handle, unsigned int position)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
915 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
916 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
917
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
918 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
919 * Create a new scrollbar window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
920 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
921 * vertical: TRUE or FALSE if scrollbar is vertical.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
922 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
923 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
924 * A handle to a scrollbar window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
925 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
926 HWND API dw_scrollbar_new(int vertical, ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
927 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
928 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
929 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
930
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
931 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
932 * Returns the position of the scrollbar.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
933 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
934 * handle: Handle to the scrollbar to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
935 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
936 * Position of the scrollbar in the set range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
937 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
938 unsigned int API dw_scrollbar_get_pos(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
939 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
940 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
941 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
942
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
943 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
944 * Sets the scrollbar position.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
945 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
946 * handle: Handle to the scrollbar to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
947 * position: Position of the scrollbar withing the range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
948 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
949 void API dw_scrollbar_set_pos(HWND handle, unsigned int position)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
950 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
951 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
952
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
953 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
954 * Sets the scrollbar range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
955 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
956 * handle: Handle to the scrollbar to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
957 * range: Maximum range value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
958 * visible: Visible area relative to the range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
959 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
960 void API dw_scrollbar_set_range(HWND handle, unsigned int range, unsigned int visible)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
961 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
962 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
963
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
964 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
965 * Create a new percent bar window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
966 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
967 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
968 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
969 * A handle to a percent bar window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
970 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
971 HWND API dw_percent_new(ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
972 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
973 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
974 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
975
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
976 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
977 * Sets the percent bar position.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
978 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
979 * handle: Handle to the percent bar to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
980 * position: Position of the percent bar withing the range.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
981 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
982 void API dw_percent_set_pos(HWND handle, unsigned int position)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
983 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
984 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
985
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
986 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
987 * Create a new checkbox window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
988 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
989 * text: The text to be display by the static text widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
990 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
991 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
992 * A handle to a checkbox window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
993 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
994 HWND API dw_checkbox_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
995 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
996 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
997 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
998
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
999 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1000 * Returns the state of the checkbox.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1001 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1002 * handle: Handle to the checkbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1003 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1004 * State of checkbox (TRUE or FALSE).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1005 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1006 int API dw_checkbox_get(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1007 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1008 return FALSE;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1009 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1010
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1011 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1012 * Sets the state of the checkbox.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1013 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1014 * handle: Handle to the checkbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1015 * value: TRUE for checked, FALSE for unchecked.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1016 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1017 void API dw_checkbox_set(HWND handle, int value)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1018 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1019 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1020
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1021 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1022 * Create a new listbox window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1023 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1024 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1025 * multi: Multiple select TRUE or FALSE.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1026 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1027 * A handle to a listbox window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1028 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1029 HWND API dw_listbox_new(ULONG cid, int multi)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1030 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1031 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1032 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1033
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1034 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1035 * Appends the specified text to the listbox's (or combobox) entry list.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1036 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1037 * handle: Handle to the listbox to be appended to.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1038 * text: Text to append into listbox.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1039 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1040 void API dw_listbox_append(HWND handle, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1041 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1042 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1043
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1044 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1045 * Inserts the specified text into the listbox's (or combobox) entry list.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1046 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1047 * handle: Handle to the listbox to be inserted into.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1048 * text: Text to insert into listbox.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1049 * pos: 0-based position to insert text
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1050 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1051 void API dw_listbox_insert(HWND handle, const char *text, int pos)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1052 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1053 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1054
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1055 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1056 * Appends the specified text items to the listbox's (or combobox) entry list.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1057 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1058 * handle: Handle to the listbox to be appended to.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1059 * text: Text strings to append into listbox.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1060 * count: Number of text strings to append
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1061 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1062 void API dw_listbox_list_append(HWND handle, char **text, int count)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1063 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1064 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1065
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1066 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1067 * Clears the listbox's (or combobox) list of all entries.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1068 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1069 * handle: Handle to the listbox to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1070 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1071 void API dw_listbox_clear(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1072 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1073 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1074
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1075 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1076 * Returns the listbox's item count.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1077 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1078 * handle: Handle to the listbox to be counted.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1079 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1080 * The number of items in the listbox.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1081 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1082 int API dw_listbox_count(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1083 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1084 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1085 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1086
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1087 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1088 * Sets the topmost item in the viewport.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1089 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1090 * handle: Handle to the listbox to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1091 * top: Index to the top item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1092 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1093 void API dw_listbox_set_top(HWND handle, int top)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1094 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1095 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1096
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1097 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1098 * Copies the given index item's text into buffer.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1099 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1100 * handle: Handle to the listbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1101 * index: Index into the list to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1102 * buffer: Buffer where text will be copied.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1103 * length: Length of the buffer (including NULL).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1104 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1105 void API dw_listbox_get_text(HWND handle, unsigned int index, char *buffer, unsigned int length)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1106 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1107 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1108
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1109 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1110 * Sets the text of a given listbox entry.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1111 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1112 * handle: Handle to the listbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1113 * index: Index into the list to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1114 * buffer: Buffer where text will be copied.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1115 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1116 void API dw_listbox_set_text(HWND handle, unsigned int index, const char *buffer)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1117 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1118 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1119
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1120 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1121 * Returns the index to the item in the list currently selected.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1122 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1123 * handle: Handle to the listbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1124 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1125 * The selected item index or DW_ERROR_UNKNOWN (-1) on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1126 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1127 int API dw_listbox_selected(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1128 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1129 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1130 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1131
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1132 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1133 * Returns the index to the current selected item or -1 when done.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1134 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1135 * handle: Handle to the listbox to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1136 * where: Either the previous return or -1 to restart.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1137 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1138 * The next selected item or DW_ERROR_UNKNOWN (-1) on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1139 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1140 int API dw_listbox_selected_multi(HWND handle, int where)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1141 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1142 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1143 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1144
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1145 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1146 * Sets the selection state of a given index.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1147 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1148 * handle: Handle to the listbox to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1149 * index: Item index.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1150 * state: TRUE if selected FALSE if unselected.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1151 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1152 void API dw_listbox_select(HWND handle, int index, int state)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1153 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1154 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1155
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1156 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1157 * Deletes the item with given index from the list.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1158 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1159 * handle: Handle to the listbox to be set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1160 * index: Item index.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1161 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1162 void API dw_listbox_delete(HWND handle, int index)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1163 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1164 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1165
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1166 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1167 * Create a new Combobox window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1168 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1169 * text: The default text to be in the combpbox widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1170 * id: An ID to be used with dw_window_from_id() or 0L.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1171 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1172 * A handle to a combobox window or NULL on failure.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1173 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1174 HWND API dw_combobox_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1175 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1176 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1177 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1178
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1179 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1180 * Create a new Multiline Editbox window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1181 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1182 * id: An ID to be used with dw_window_from_id() or 0L.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1183 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1184 * A handle to a MLE window or NULL on failure.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1185 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1186 HWND API dw_mle_new(ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1187 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1188 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1189 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1190
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1191 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1192 * Adds text to an MLE box and returns the current point.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1193 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1194 * handle: Handle to the MLE to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1195 * buffer: Text buffer to be imported.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1196 * startpoint: Point to start entering text.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1197 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1198 * Current position in the buffer.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1199 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1200 unsigned int API dw_mle_import(HWND handle, const char *buffer, int startpoint)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1201 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1202 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1203 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1204
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1205 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1206 * Grabs text from an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1207 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1208 * handle: Handle to the MLE to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1209 * buffer: Text buffer to be exported.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1210 * startpoint: Point to start grabbing text.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1211 * length: Amount of text to be grabbed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1212 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1213 void API dw_mle_export(HWND handle, char *buffer, int startpoint, int length)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1214 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1215 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1216
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1217 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1218 * Obtains information about an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1219 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1220 * handle: Handle to the MLE to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1221 * bytes: A pointer to a variable to return the total bytes.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1222 * lines: A pointer to a variable to return the number of lines.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1223 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1224 void API dw_mle_get_size(HWND handle, unsigned long *bytes, unsigned long *lines)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1225 {
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1226 if(bytes)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1227 *bytes = 0;
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1228 if(lines)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1229 *lines = 0;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1230 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1231
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1232 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1233 * Deletes text from an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1234 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1235 * handle: Handle to the MLE to be deleted from.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1236 * startpoint: Point to start deleting text.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1237 * length: Amount of text to be deleted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1238 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1239 void API dw_mle_delete(HWND handle, int startpoint, int length)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1240 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1241 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1242
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1243 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1244 * Clears all text from an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1245 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1246 * handle: Handle to the MLE to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1247 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1248 void API dw_mle_clear(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1249 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1250 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1251
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1252 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1253 * Sets the visible line of an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1254 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1255 * handle: Handle to the MLE to be positioned.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1256 * line: Line to be visible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1257 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1258 void API dw_mle_set_visible(HWND handle, int line)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1259 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1260 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1261
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1262 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1263 * Sets the editablity of an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1264 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1265 * handle: Handle to the MLE.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1266 * state: TRUE if it can be edited, FALSE for readonly.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1267 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1268 void API dw_mle_set_editable(HWND handle, int state)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1269 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1270 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1271
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1272 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1273 * Sets the word wrap state of an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1274 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1275 * handle: Handle to the MLE.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1276 * state: TRUE if it wraps, FALSE if it doesn't.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1277 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1278 void API dw_mle_set_word_wrap(HWND handle, int state)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1279 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1280 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1281
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1282 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1283 * Sets the current cursor position of an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1284 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1285 * handle: Handle to the MLE to be positioned.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1286 * point: Point to position cursor.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1287 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1288 void API dw_mle_set_cursor(HWND handle, int point)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1289 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1290 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1291
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1292 /*
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1293 * Sets the word auto complete state of an MLE box.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1294 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1295 * handle: Handle to the MLE.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1296 * state: Bitwise combination of DW_MLE_COMPLETE_TEXT/DASH/QUOTE
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1297 */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1298 void API dw_mle_set_auto_complete(HWND handle, int state)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1299 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1300 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1301
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1302 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1303 * Finds text in an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1304 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1305 * handle: Handle to the MLE to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1306 * text: Text to search for.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1307 * point: Start point of search.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1308 * flags: Search specific flags.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1309 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1310 * Position in buffer or DW_ERROR_UNKNOWN (-1) on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1311 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1312 int API dw_mle_search(HWND handle, const char *text, int point, unsigned long flags)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1313 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1314 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1315 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1316
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1317 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1318 * Stops redrawing of an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1319 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1320 * handle: Handle to the MLE to freeze.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1321 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1322 void API dw_mle_freeze(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1323 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1324 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1325
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1326 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1327 * Resumes redrawing of an MLE box.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1328 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1329 * handle: Handle to the MLE to thaw.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1330 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1331 void API dw_mle_thaw(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1332 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1333 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1334
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1335 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1336 * Create a new status text window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1337 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1338 * text: The text to be display by the static text widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1339 * id: An ID to be used with dw_window_from_id() or 0L.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1340 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1341 * A handle to a status text window or NULL on failure.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1342 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1343 HWND API dw_status_text_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1344 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1345 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1346 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1347
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1348 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1349 * Create a new static text window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1350 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1351 * text: The text to be display by the static text widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1352 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1353 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1354 * A handle to a text window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1355 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1356 HWND API dw_text_new(const char *text, ULONG cid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1357 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1358 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1359 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1360
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1361 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1362 * Creates a rendering context widget (window) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1363 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1364 * id: An id to be used with dw_window_from_id.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1365 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1366 * A handle to the widget or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1367 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1368 HWND API dw_render_new(unsigned long cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1369 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1370 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1371 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1372
2355
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1373 /*
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1374 * Invalidate the render widget triggering an expose event.
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1375 * Parameters:
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1376 * handle: A handle to a render widget to be redrawn.
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1377 */
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1378 void API dw_render_redraw(HWND handle)
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1379 {
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1380 }
fad0821cb953 Add new function dw_render_redraw() which will trigger expose event on render widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2227
diff changeset
1381
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1382 /* Sets the current foreground drawing color.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1383 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1384 * red: red value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1385 * green: green value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1386 * blue: blue value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1387 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1388 void API dw_color_foreground_set(unsigned long value)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1389 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1390 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1391
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1392 /* Sets the current background drawing color.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1393 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1394 * red: red value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1395 * green: green value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1396 * blue: blue value.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1397 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1398 void API dw_color_background_set(unsigned long value)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1399 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1400 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1401
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1402 /* Allows the user to choose a color using the system's color chooser dialog.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1403 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1404 * value: current color
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1405 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1406 * The selected color or the current color if cancelled.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1407 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1408 unsigned long API dw_color_choose(unsigned long value)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1409 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1410 return value;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1411 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1412
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1413 /* Draw a point on a window (preferably a render window).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1414 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1415 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1416 * pixmap: Handle to the pixmap. (choose only one of these)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1417 * x: X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1418 * y: Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1419 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1420 void API dw_draw_point(HWND handle, HPIXMAP pixmap, int x, int y)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1421 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1422 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1423
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1424 /* Draw a line on a window (preferably a render window).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1425 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1426 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1427 * pixmap: Handle to the pixmap. (choose only one of these)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1428 * x1: First X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1429 * y1: First Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1430 * x2: Second X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1431 * y2: Second Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1432 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1433 void API dw_draw_line(HWND handle, HPIXMAP pixmap, int x1, int y1, int x2, int y2)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1434 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1435 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1436
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1437 /* Draw text on a window (preferably a render window).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1438 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1439 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1440 * pixmap: Handle to the pixmap. (choose only one of these)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1441 * x: X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1442 * y: Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1443 * text: Text to be displayed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1444 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1445 void API dw_draw_text(HWND handle, HPIXMAP pixmap, int x, int y, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1446 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1447 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1448
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1449 /* Query the width and height of a text string.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1450 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1451 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1452 * pixmap: Handle to the pixmap. (choose only one of these)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1453 * text: Text to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1454 * width: Pointer to a variable to be filled in with the width.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1455 * height: Pointer to a variable to be filled in with the height.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1456 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1457 void API dw_font_text_extents_get(HWND handle, HPIXMAP pixmap, const char *text, int *width, int *height)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1458 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1459 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1460
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1461 /* Draw a polygon on a window (preferably a render window).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1462 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1463 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1464 * pixmap: Handle to the pixmap. (choose only one of these)
1275
0b34e2cf0706 Updated dw_draw_rect and dw_draw_polygon to accept flags the same way as dw_draw_arc.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1261
diff changeset
1465 * flags: DW_DRAW_FILL (1) to fill the polygon or DW_DRAW_DEFAULT (0).
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1466 * npoints: Number of points passed in.
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1467 * x: Pointer to array of X coordinates.
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1468 * y: Pointer to array of Y coordinates.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1469 */
1275
0b34e2cf0706 Updated dw_draw_rect and dw_draw_polygon to accept flags the same way as dw_draw_arc.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1261
diff changeset
1470 void API dw_draw_polygon( HWND handle, HPIXMAP pixmap, int flags, int npoints, int *x, int *y )
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1471 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1472 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1473
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1474 /* Draw a rectangle on a window (preferably a render window).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1475 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1476 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1477 * pixmap: Handle to the pixmap. (choose only one of these)
1275
0b34e2cf0706 Updated dw_draw_rect and dw_draw_polygon to accept flags the same way as dw_draw_arc.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1261
diff changeset
1478 * flags: DW_DRAW_FILL (1) to fill the box or DW_DRAW_DEFAULT (0).
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1479 * x: X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1480 * y: Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1481 * width: Width of rectangle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1482 * height: Height of rectangle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1483 */
1275
0b34e2cf0706 Updated dw_draw_rect and dw_draw_polygon to accept flags the same way as dw_draw_arc.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1261
diff changeset
1484 void API dw_draw_rect(HWND handle, HPIXMAP pixmap, int flags, int x, int y, int width, int height)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1485 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1486 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1487
1261
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1488 /* Draw an arc on a window (preferably a render window).
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1489 * Parameters:
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1490 * handle: Handle to the window.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1491 * pixmap: Handle to the pixmap. (choose only one of these)
1275
0b34e2cf0706 Updated dw_draw_rect and dw_draw_polygon to accept flags the same way as dw_draw_arc.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1261
diff changeset
1492 * flags: DW_DRAW_FILL (1) to fill the arc or DW_DRAW_DEFAULT (0).
0b34e2cf0706 Updated dw_draw_rect and dw_draw_polygon to accept flags the same way as dw_draw_arc.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1261
diff changeset
1493 * DW_DRAW_FULL will draw a complete circle/elipse.
1261
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1494 * xorigin: X coordinate of center of arc.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1495 * yorigin: Y coordinate of center of arc.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1496 * x1: X coordinate of first segment of arc.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1497 * y1: Y coordinate of first segment of arc.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1498 * x2: X coordinate of second segment of arc.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1499 * y2: Y coordinate of second segment of arc.
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1500 */
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1501 void API dw_draw_arc(HWND handle, HPIXMAP pixmap, int flags, int xorigin, int yorigin, int x1, int y1, int x2, int y2)
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1502 {
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1503 }
61d0c5f84644 Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1211
diff changeset
1504
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1505 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1506 * Create a tree object to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1507 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1508 * id: An ID to be used for getting the resource from the
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1509 * resource file.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1510 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1511 * A handle to a tree window or NULL on failure.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1512 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1513 HWND API dw_tree_new(ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1514 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1515 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1516 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1517
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1518 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1519 * Inserts an item into a tree window (widget) after another item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1520 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1521 * handle: Handle to the tree to be inserted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1522 * item: Handle to the item to be positioned after.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1523 * title: The text title of the entry.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1524 * icon: Handle to coresponding icon.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1525 * parent: Parent handle or 0 if root.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1526 * itemdata: Item specific data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1527 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1528 * A handle to a tree item or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1529 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1530 HTREEITEM API dw_tree_insert_after(HWND handle, HTREEITEM item, const char *title, HICN icon, HTREEITEM parent, void *itemdata)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1531 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1532 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1533 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1534
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1535 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1536 * Inserts an item into a tree window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1537 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1538 * handle: Handle to the tree to be inserted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1539 * title: The text title of the entry.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1540 * icon: Handle to coresponding icon.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1541 * parent: Parent handle or 0 if root.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1542 * itemdata: Item specific data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1543 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1544 * A handle to a tree item or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1545 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1546 HTREEITEM API dw_tree_insert(HWND handle, const char *title, HICN icon, HTREEITEM parent, void *itemdata)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1547 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1548 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1549 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1550
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1551 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1552 * Gets the text an item in a tree window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1553 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1554 * handle: Handle to the tree containing the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1555 * item: Handle of the item to be modified.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1556 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1557 * A malloc()ed buffer of item text to be dw_free()ed or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1558 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1559 char * API dw_tree_get_title(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1560 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1561 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1562 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1563
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1564 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1565 * Gets the text an item in a tree window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1566 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1567 * handle: Handle to the tree containing the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1568 * item: Handle of the item to be modified.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1569 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1570 * A handle to a tree item or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1571 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1572 HTREEITEM API dw_tree_get_parent(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1573 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1574 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1575 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1576
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1577 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1578 * Sets the text and icon of an item in a tree window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1579 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1580 * handle: Handle to the tree containing the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1581 * item: Handle of the item to be modified.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1582 * title: The text title of the entry.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1583 * icon: Handle to coresponding icon.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1584 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1585 void API dw_tree_item_change(HWND handle, HTREEITEM item, const char *title, HICN icon)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1586 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1587 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1588
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1589 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1590 * Sets the item data of a tree item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1591 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1592 * handle: Handle to the tree containing the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1593 * item: Handle of the item to be modified.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1594 * itemdata: User defined data to be associated with item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1595 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1596 void API dw_tree_item_set_data(HWND handle, HTREEITEM item, void *itemdata)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1597 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1598 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1599
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1600 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1601 * Gets the item data of a tree item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1602 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1603 * handle: Handle to the tree containing the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1604 * item: Handle of the item to be modified.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1605 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1606 * A pointer to tree item data or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1607 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1608 void * API dw_tree_item_get_data(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1609 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1610 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1611 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1612
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1613 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1614 * Sets this item as the active selection.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1615 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1616 * handle: Handle to the tree window (widget) to be selected.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1617 * item: Handle to the item to be selected.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1618 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1619 void API dw_tree_item_select(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1620 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1621 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1622
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1623 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1624 * Removes all nodes from a tree.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1625 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1626 * handle: Handle to the window (widget) to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1627 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1628 void API dw_tree_clear(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1629 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1630 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1631
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1632 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1633 * Expands a node on a tree.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1634 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1635 * handle: Handle to the tree window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1636 * item: Handle to node to be expanded.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1637 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1638 void API dw_tree_item_expand(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1639 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1640 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1641
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1642 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1643 * Collapses a node on a tree.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1644 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1645 * handle: Handle to the tree window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1646 * item: Handle to node to be collapsed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1647 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1648 void API dw_tree_item_collapse(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1649 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1650 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1651
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1652 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1653 * Removes a node from a tree.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1654 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1655 * handle: Handle to the window (widget) to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1656 * item: Handle to node to be deleted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1657 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1658 void API dw_tree_item_delete(HWND handle, HTREEITEM item)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1659 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1660 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1661
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1662 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1663 * Create a container object to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1664 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1665 * id: An ID to be used for getting the resource from the
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1666 * resource file.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1667 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1668 * A handle to a container window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1669 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1670 HWND API dw_container_new(ULONG cid, int multi)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1671 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1672 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1673 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1674
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1675 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1676 * Sets up the container columns.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1677 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1678 * handle: Handle to the container to be configured.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1679 * flags: An array of unsigned longs with column flags.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1680 * titles: An array of strings with column text titles.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1681 * count: The number of columns (this should match the arrays).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1682 * separator: The column number that contains the main separator.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1683 * (this item may only be used in OS/2)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1684 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1685 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1686 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1687 int API dw_container_setup(HWND handle, unsigned long *flags, char **titles, int count, int separator)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1688 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1689 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1690 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1691
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1692 /*
1749
ff9a51706715 Added optional keypress callback optional utf8 parameter on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1744
diff changeset
1693 * Configures the main filesystem column title for localization.
1744
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1694 * Parameters:
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1695 * handle: Handle to the container to be configured.
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1696 * title: The title to be displayed in the main column.
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1697 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1698 void API dw_filesystem_set_column_title(HWND handle, const char *title)
1744
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1699 {
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1700 }
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1701
535e8c19a13d Added dw_filesystem_set_column_title() function to aid in localization.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1679
diff changeset
1702 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1703 * Sets up the filesystem columns, note: filesystem always has an icon/filename field.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1704 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1705 * handle: Handle to the container to be configured.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1706 * flags: An array of unsigned longs with column flags.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1707 * titles: An array of strings with column text titles.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1708 * count: The number of columns (this should match the arrays).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1709 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1710 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1711 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1712 int API dw_filesystem_setup(HWND handle, unsigned long *flags, char **titles, int count)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1713 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1714 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1715 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1716
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1717 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1718 * Allocates memory used to populate a container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1719 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1720 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1721 * rowcount: The number of items to be populated.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1722 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1723 * Handle to container items allocated or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1724 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1725 void * API dw_container_alloc(HWND handle, int rowcount)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1726 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1727 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1728 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1729
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1730 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1731 * Sets an item in specified row and column to the given data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1732 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1733 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1734 * pointer: Pointer to the allocated memory in dw_container_alloc().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1735 * column: Zero based column of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1736 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1737 * data: Pointer to the data to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1738 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1739 void API dw_container_set_item(HWND handle, void *pointer, int column, int row, void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1740 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1741 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1742
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1743 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1744 * Changes an existing item in specified row and column to the given data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1745 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1746 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1747 * column: Zero based column of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1748 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1749 * data: Pointer to the data to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1750 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1751 void API dw_container_change_item(HWND handle, int column, int row, void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1752 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1753 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1754
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1755 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1756 * Changes an existing item in specified row and column to the given data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1757 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1758 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1759 * column: Zero based column of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1760 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1761 * data: Pointer to the data to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1762 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1763 void API dw_filesystem_change_item(HWND handle, int column, int row, void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1764 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1765 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1766
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1767 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1768 * Changes an item in specified row and column to the given data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1769 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1770 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1771 * pointer: Pointer to the allocated memory in dw_container_alloc().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1772 * column: Zero based column of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1773 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1774 * data: Pointer to the data to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1775 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1776 void API dw_filesystem_change_file(HWND handle, int row, const char *filename, HICN icon)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1777 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1778 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1779
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1780 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1781 * Sets an item in specified row and column to the given data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1782 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1783 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1784 * pointer: Pointer to the allocated memory in dw_container_alloc().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1785 * column: Zero based column of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1786 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1787 * data: Pointer to the data to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1788 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1789 void API dw_filesystem_set_file(HWND handle, void *pointer, int row, const char *filename, HICN icon)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1790 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1791 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1792
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1793 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1794 * Sets an item in specified row and column to the given data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1795 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1796 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1797 * pointer: Pointer to the allocated memory in dw_container_alloc().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1798 * column: Zero based column of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1799 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1800 * data: Pointer to the data to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1801 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1802 void API dw_filesystem_set_item(HWND handle, void *pointer, int column, int row, void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1803 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1804 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1805
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1806 /*
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1807 * Sets the data of a row in the container.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1808 * Parameters:
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1809 * pointer: Pointer to the allocated memory in dw_container_alloc().
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1810 * row: Zero based row of data being set.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1811 * data: Data pointer.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1812 */
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1813 void API dw_container_set_row_data(void *pointer, int row, void *data)
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1814 {
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1815 }
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1816
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1817 /*
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1818 * Changes the data of a row already inserted in the container.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1819 * Parameters:
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1820 * handle: Handle to the container window (widget).
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1821 * row: Zero based row of data being set.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1822 * data: Data pointer.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1823 */
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1824 void API dw_container_change_row_data(HWND handle, int row, void *data)
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1825 {
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1826 }
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1827
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
1828 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1829 * Gets column type for a container column.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1830 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1831 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1832 * column: Zero based column.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1833 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1834 * Constant identifying the the column type.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1835 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1836 int API dw_container_get_column_type(HWND handle, int column)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1837 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1838 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1839 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1840
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1841 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1842 * Gets column type for a filesystem container column.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1843 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1844 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1845 * column: Zero based column.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1846 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1847 * Constant identifying the the column type.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
1848 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1849 int API dw_filesystem_get_column_type(HWND handle, int column)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1850 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1851 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1852 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1853
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1854 /*
1208
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1855 * Sets the alternating row colors for container window (widget) handle.
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1856 * Parameters:
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1857 * handle: The window (widget) handle.
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1858 * oddcolor: Odd row background color in DW_RGB format or a default color index.
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1859 * evencolor: Even row background color in DW_RGB format or a default color index.
1211
70dca53cb071 Updated GTK3 with the behavior change just commited for Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1208
diff changeset
1860 * DW_RGB_TRANSPARENT will disable coloring rows.
70dca53cb071 Updated GTK3 with the behavior change just commited for Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1208
diff changeset
1861 * DW_CLR_DEFAULT will use the system default alternating row colors.
1208
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1862 */
1291
b99b0b2c2826 Renamed dw_container_set_row_bg() to dw_container_set_stripe().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1275
diff changeset
1863 void API dw_container_set_stripe(HWND handle, unsigned long oddcolor, unsigned long evencolor)
1208
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1864 {
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1865 }
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1866
53547c9c99a2 Added dw_container_set_row_bg() stubs on the remaining platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1158
diff changeset
1867 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1868 * Sets the width of a column in the container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1869 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1870 * handle: Handle to window (widget) of container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1871 * column: Zero based column of width being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1872 * width: Width of column in pixels.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1873 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1874 void API dw_container_set_column_width(HWND handle, int column, int width)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1875 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1876 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1877
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1878 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1879 * Sets the title of a row in the container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1880 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1881 * pointer: Pointer to the allocated memory in dw_container_alloc().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1882 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1883 * title: String title of the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1884 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1885 void API dw_container_set_row_title(void *pointer, int row, const char *title)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1886 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1887 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1888
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1889
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1890 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1891 * Sets the title of a row in the container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1892 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1893 * handle: Handle to window (widget) of container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1894 * row: Zero based row of data being set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1895 * title: String title of the item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1896 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1897 void API dw_container_change_row_title(HWND handle, int row, const char *title)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1898 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1899 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1900
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1901 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1902 * Sets the title of a row in the container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1903 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1904 * handle: Handle to the container window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1905 * pointer: Pointer to the allocated memory in dw_container_alloc().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1906 * rowcount: The number of rows to be inserted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1907 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1908 void API dw_container_insert(HWND handle, void *pointer, int rowcount)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1909 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1910 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1911
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1912 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1913 * Removes all rows from a container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1914 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1915 * handle: Handle to the window (widget) to be cleared.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1916 * redraw: TRUE to cause the container to redraw immediately.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1917 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1918 void API dw_container_clear(HWND handle, int redraw)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1919 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1920 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1921
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1922 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1923 * Removes the first x rows from a container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1924 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1925 * handle: Handle to the window (widget) to be deleted from.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1926 * rowcount: The number of rows to be deleted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1927 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1928 void API dw_container_delete(HWND handle, int rowcount)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1929 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1930 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1931
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1932 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1933 * Scrolls container up or down.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1934 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1935 * handle: Handle to the window (widget) to be scrolled.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1936 * direction: DW_SCROLL_UP, DW_SCROLL_DOWN, DW_SCROLL_TOP or
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1937 * DW_SCROLL_BOTTOM. (rows is ignored for last two)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1938 * rows: The number of rows to be scrolled.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1939 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1940 void API dw_container_scroll(HWND handle, int direction, long rows)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1941 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1942 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1943
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1944 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1945 * Starts a new query of a container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1946 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1947 * handle: Handle to the window (widget) to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1948 * flags: If this parameter is DW_CRA_SELECTED it will only
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1949 * return items that are currently selected. Otherwise
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1950 * it will return all records in the container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1951 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1952 * Pointer to data associated with first entry or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1953 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1954 char * API dw_container_query_start(HWND handle, unsigned long flags)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1955 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1956 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1957 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1958
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1959 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1960 * Continues an existing query of a container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1961 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1962 * handle: Handle to the window (widget) to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1963 * flags: If this parameter is DW_CRA_SELECTED it will only
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1964 * return items that are currently selected. Otherwise
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1965 * it will return all records in the container.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1966 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1967 * Pointer to data associated with next entry or NULL on error or completion.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
1968 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1969 char * API dw_container_query_next(HWND handle, unsigned long flags)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1970 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1971 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1972 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1973
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1974 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1975 * Cursors the item with the text speficied, and scrolls to that item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1976 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1977 * handle: Handle to the window (widget) to be queried.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1978 * text: Text usually returned by dw_container_query().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1979 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
1980 void API dw_container_cursor(HWND handle, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1981 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1982 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1983
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1984 /*
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1985 * Cursors the item with the data speficied, and scrolls to that item.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1986 * Parameters:
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1987 * handle: Handle to the window (widget) to be queried.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1988 * data: Data usually returned by dw_container_query().
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1989 */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1990 void API dw_container_cursor_by_data(HWND handle, void *data)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1991 {
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1992 }
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1993
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
1994 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1995 * Deletes the item with the text speficied.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1996 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1997 * handle: Handle to the window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1998 * text: Text usually returned by dw_container_query().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
1999 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2000 void API dw_container_delete_row(HWND handle, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2001 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2002 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2003
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2004 /*
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2005 * Deletes the item with the data speficied.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2006 * Parameters:
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2007 * handle: Handle to the window (widget).
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2008 * data: Data usually returned by dw_container_query().
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2009 */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2010 void API dw_container_delete_row_by_data(HWND handle, void *data)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2011 {
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2012 }
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2013
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
2014 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2015 * Optimizes the column widths so that all data is visible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2016 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2017 * handle: Handle to the window (widget) to be optimized.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2018 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2019 void API dw_container_optimize(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2020 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2021 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2022
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2023 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2024 * Inserts an icon into the taskbar.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2025 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2026 * handle: Window handle that will handle taskbar icon messages.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2027 * icon: Icon handle to display in the taskbar.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2028 * bubbletext: Text to show when the mouse is above the icon.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2029 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2030 void API dw_taskbar_insert(HWND handle, HICN icon, const char *bubbletext)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2031 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2032 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2033
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2034 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2035 * Deletes an icon from the taskbar.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2036 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2037 * handle: Window handle that was used with dw_taskbar_insert().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2038 * icon: Icon handle that was used with dw_taskbar_insert().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2039 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2040 void API dw_taskbar_delete(HWND handle, HICN icon)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2041 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2042 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2043
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2044 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2045 * Obtains an icon from a module (or header in GTK).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2046 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2047 * module: Handle to module (DLL) in OS/2 and Windows.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2048 * id: A unsigned long id int the resources on OS/2 and
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2049 * Windows, on GTK this is converted to a pointer
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2050 * to an embedded XPM.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2051 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2052 * Handle to the created icon or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2053 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2054 HICN API dw_icon_load(unsigned long module, unsigned long resid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2055 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2056 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2057 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2058
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2059 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2060 * Obtains an icon from a file.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2061 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2062 * filename: Name of the file, omit extention to have
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2063 * DW pick the appropriate file extension.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2064 * (ICO on OS/2 or Windows, XPM on Unix)
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2065 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2066 * Handle to the created icon or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2067 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2068 HICN API dw_icon_load_from_file(const char *filename)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2069 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2070 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2071 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2072
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2073 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2074 * Obtains an icon from data.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2075 * Parameters:
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2076 * data: Data for the icon (ICO on OS/2 or Windows, XPM on Unix, PNG on Mac)
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2077 * len: Length of the passed in data.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2078 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2079 * Handle to the created icon or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2080 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2081 HICN API dw_icon_load_from_data(const char *data, int len)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2082 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2083 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2084 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2085
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2086 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2087 * Frees a loaded icon resource.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2088 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2089 * handle: Handle to icon returned by dw_icon_load().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2090 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2091 void API dw_icon_free(HICN handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2092 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2093 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2094
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2095 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2096 * Create a new MDI Frame to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2097 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2098 * id: An ID to be used with dw_window_from_id or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2099 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2100 * Handle to the created MDI widget or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2101 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2102 HWND API dw_mdi_new(unsigned long cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2103 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2104 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2105 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2106
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2107 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2108 * Creates a splitbar window (widget) with given parameters.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2109 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2110 * type: Value can be DW_VERT or DW_HORZ.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2111 * topleft: Handle to the window to be top or left.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2112 * bottomright: Handle to the window to be bottom or right.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2113 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2114 * A handle to a splitbar window or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2115 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2116 HWND API dw_splitbar_new(int type, HWND topleft, HWND bottomright, unsigned long cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2117 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2118 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2119 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2120
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2121 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2122 * Sets the position of a splitbar (pecentage).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2123 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2124 * handle: The handle to the splitbar returned by dw_splitbar_new().
1117
9ca5de2e59f8 Fixed the dw_splitbar_set() comment documentation. The percent parameter was missing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1115
diff changeset
2125 * percent: The position of the splitbar.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2126 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2127 void API dw_splitbar_set(HWND handle, float percent)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2128 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2129 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2130
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2131 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2132 * Gets the position of a splitbar (pecentage).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2133 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2134 * handle: The handle to the splitbar returned by dw_splitbar_new().
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2135 * Returns:
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2136 * Position of the splitbar (percentage).
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2137 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2138 float API dw_splitbar_get(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2139 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2140 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2141 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2142
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2143 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2144 * Create a bitmap object to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2145 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2146 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2147 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2148 * Handle to the created bitmap widget or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2149 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2150 HWND API dw_bitmap_new(ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2151 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2152 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2153 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2154
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2155 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2156 * Creates a pixmap with given parameters.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2157 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2158 * handle: Window handle the pixmap is associated with.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2159 * width: Width of the pixmap in pixels.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2160 * height: Height of the pixmap in pixels.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2161 * depth: Color depth of the pixmap.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2162 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2163 * A handle to a pixmap or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2164 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2165 HPIXMAP API dw_pixmap_new(HWND handle, unsigned long width, unsigned long height, int depth)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2166 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2167 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2168 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2169
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2170 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2171 * Creates a pixmap from a file.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2172 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2173 * handle: Window handle the pixmap is associated with.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2174 * filename: Name of the file, omit extention to have
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2175 * DW pick the appropriate file extension.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2176 * (BMP on OS/2 or Windows, XPM on Unix)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2177 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2178 * A handle to a pixmap or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2179 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2180 HPIXMAP API dw_pixmap_new_from_file(HWND handle, const char *filename)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2181 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2182 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2183 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2184
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2185 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2186 * Creates a pixmap from data in memory.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2187 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2188 * handle: Window handle the pixmap is associated with.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2189 * data: Source of the image data
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2190 * (BMP on OS/2 or Windows, XPM on Unix)
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2191 * len: Length of data
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2192 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2193 * A handle to a pixmap or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2194 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2195 HPIXMAP API dw_pixmap_new_from_data(HWND handle, const char *data, int len)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2196 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2197 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2198 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2199
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2200 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2201 * Sets the transparent color for a pixmap.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2202 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2203 * pixmap: Handle to a pixmap returned by
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2204 * dw_pixmap_new..
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2205 * color: Transparent RGB color
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2206 * Note: This is only necessary on platforms that
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2207 * don't handle transparency automatically
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2208 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2209 void API dw_pixmap_set_transparent_color( HPIXMAP pixmap, ULONG color )
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2210 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2211 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2212
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2213 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2214 * Creates a pixmap from internal resource graphic specified by id.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2215 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2216 * handle: Window handle the pixmap is associated with.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2217 * id: Resource ID associated with requested pixmap.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2218 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2219 * A handle to a pixmap or NULL on failure.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2220 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2221 HPIXMAP API dw_pixmap_grab(HWND handle, ULONG resid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2222 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2223 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2224 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2225
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2226 /*
1147
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2227 * Sets the font used by a specified pixmap.
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2228 * Normally the pixmap font is obtained from the associated window handle.
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2229 * However this can be used to override that, or for pixmaps with no window.
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2230 * Parameters:
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2231 * pixmap: Handle to a pixmap returned by dw_pixmap_new() or
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2232 * passed to the application via a callback.
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2233 * fontname: Name and size of the font in the form "size.fontname"
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2234 * Returns:
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2235 * DW_ERROR_NONE on success and DW_ERROR_GENERAL on failure.
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2236 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2237 int API dw_pixmap_set_font(HPIXMAP pixmap, const char *fontname)
1147
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2238 {
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2239 return DW_ERROR_GENERAL;
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2240 }
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2241
091ed7c20b3f Implemented dw_pixmap_set_font() on Windows. Added to export files on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1137
diff changeset
2242 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2243 * Destroys an allocated pixmap.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2244 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2245 * pixmap: Handle to a pixmap returned by
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2246 * dw_pixmap_new..
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2247 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2248 void API dw_pixmap_destroy(HPIXMAP pixmap)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2249 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2250 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2251
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2252 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2253 * Copies from one item to another.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2254 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2255 * dest: Destination window handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2256 * destp: Destination pixmap. (choose only one).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2257 * xdest: X coordinate of destination.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2258 * ydest: Y coordinate of destination.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2259 * width: Width of area to copy.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2260 * height: Height of area to copy.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2261 * src: Source window handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2262 * srcp: Source pixmap. (choose only one).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2263 * xsrc: X coordinate of source.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2264 * ysrc: Y coordinate of source.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2265 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2266 void API dw_pixmap_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2267 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2268 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2269
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2270 /*
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2271 * Copies from one surface to another allowing for stretching.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2272 * Parameters:
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2273 * dest: Destination window handle.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2274 * destp: Destination pixmap. (choose only one).
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2275 * xdest: X coordinate of destination.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2276 * ydest: Y coordinate of destination.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2277 * width: Width of the target area.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2278 * height: Height of the target area.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2279 * src: Source window handle.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2280 * srcp: Source pixmap. (choose only one).
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2281 * xsrc: X coordinate of source.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2282 * ysrc: Y coordinate of source.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2283 * srcwidth: Width of area to copy.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2284 * srcheight: Height of area to copy.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2285 * Returns:
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2286 * DW_ERROR_NONE on success and DW_ERROR_GENERAL on failure.
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2287 */
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2288 int API dw_pixmap_stretch_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc, int srcwidth, int srcheight)
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2289 {
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2290 return DW_ERROR_GENERAL;
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2291 }
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2292
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2293 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2294 * Create a new calendar window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2295 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2296 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2297 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2298 * Handle to the created calendar or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2299 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2300 HWND API dw_calendar_new(ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2301 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2302 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2303 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2304
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2305 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2306 * Sets the current date of a calendar.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2307 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2308 * handle: The handle to the calendar returned by dw_calendar_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2309 * year, month, day: To set the calendar to display.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2310 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2311 void API dw_calendar_set_date(HWND handle, unsigned int year, unsigned int month, unsigned int day)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2312 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2313 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2314
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2315 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2316 * Gets the year, month and day set in the calendar widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2317 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2318 * handle: The handle to the calendar returned by dw_calendar_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2319 * year: Variable to store the year or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2320 * month: Variable to store the month or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2321 * day: Variable to store the day or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2322 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2323 void API dw_calendar_get_date(HWND handle, unsigned int *year, unsigned int *month, unsigned int *day)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2324 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2325 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2326
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2327 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2328 * Causes the embedded HTML widget to take action.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2329 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2330 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2331 * action: One of the DW_HTML_* constants.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2332 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2333 void API dw_html_action(HWND handle, int action)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2334 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2335 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2336
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2337 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2338 * Render raw HTML code in the embedded HTML widget..
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2339 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2340 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2341 * string: String buffer containt HTML code to
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2342 * be rendered.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2343 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2344 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2345 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2346 int API dw_html_raw(HWND handle, const char *string)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2347 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2348 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2349 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2350
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2351 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2352 * Render file or web page in the embedded HTML widget..
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2353 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2354 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2355 * url: Universal Resource Locator of the web or
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2356 * file object to be rendered.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2357 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2358 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2359 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2360 int API dw_html_url(HWND handle, const char *url)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2361 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2362 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2363 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2364
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2365 /*
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2366 * Executes the javascript contained in "script" in the HTML window.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2367 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2368 * handle: Handle to the HTML window.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2369 * script: Javascript code to execute.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2370 * scriptdata: Data passed to the signal handler.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2371 * Notes: A DW_SIGNAL_HTML_RESULT event will be raised with scriptdata.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2372 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2373 * DW_ERROR_NONE (0) on success.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2374 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
2375 int API dw_html_javascript_run(HWND handle, const char *script, void *scriptdata)
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2376 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2377 return DW_ERROR_UNKNOWN;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2378 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2379
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2380 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2381 * Create a new HTML window (widget) to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2382 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2383 * id: An ID to be used with dw_window_from_id() or 0L.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2384 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2385 * Handle to the created html widget or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2386 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2387 HWND API dw_html_new(unsigned long cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2388 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2389 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2390 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2391
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2392 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2393 * Returns the current X and Y coordinates of the mouse pointer.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2394 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2395 * x: Pointer to variable to store X coordinate or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2396 * y: Pointer to variable to store Y coordinate or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2397 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2398 void API dw_pointer_query_pos(long *x, long *y)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2399 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2400 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2401
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2402 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2403 * Sets the X and Y coordinates of the mouse pointer.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2404 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2405 * x: X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2406 * y: Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2407 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2408 void API dw_pointer_set_pos(long x, long y)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2409 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2410 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2411
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2412 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2413 * Create a menu object to be popped up.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2414 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2415 * id: An ID to be used associated with this menu.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2416 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2417 * Handle to the created menu or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2418 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2419 HMENUI API dw_menu_new(ULONG cid)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2420 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2421 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2422 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2423
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2424 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2425 * Create a menubar on a window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2426 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2427 * location: Handle of a window frame to be attached to.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2428 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2429 * Handle to the created menu bar or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2430 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2431 HMENUI API dw_menubar_new(HWND location)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2432 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2433 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2434 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2435
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2436 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2437 * Destroys a menu created with dw_menubar_new or dw_menu_new.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2438 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2439 * menu: Handle of a menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2440 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2441 void API dw_menu_destroy(HMENUI *menu)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2442 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2443 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2444
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2445 /*
1371
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2446 * Deletes the menu item specified.
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2447 * Parameters:
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2448 * menu: The handle to the menu in which the item was appended.
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2449 * id: Menuitem id.
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2450 * Returns:
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2451 * DW_ERROR_NONE (0) on success or DW_ERROR_UNKNOWN on failure.
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2452 */
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2453 int API dw_menu_delete_item(HMENUI menux, unsigned long id)
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2454 {
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2455 return DW_ERROR_UNKNOWN;
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2456 }
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2457
896347a9be19 Initial versions of dw_menu_delete_item() on OS/2 and Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1306
diff changeset
2458 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2459 * Pops up a context menu at given x and y coordinates.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2460 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2461 * menu: The handle the the existing menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2462 * parent: Handle to the window initiating the popup.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2463 * x: X coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2464 * y: Y coordinate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2465 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2466 void API dw_menu_popup(HMENUI *menu, HWND parent, int x, int y)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2467 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2468 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2469
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2470 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2471 * Adds a menuitem or submenu to an existing menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2472 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2473 * menu: The handle the the existing menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2474 * title: The title text on the menu item to be added.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2475 * id: An ID to be used for message passing.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2476 * flags: Extended attributes to set on the menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2477 * end: If TRUE memu is positioned at the end of the menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2478 * check: If TRUE menu is "check"able.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2479 * submenu: Handle to an existing menu to be a submenu or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2480 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2481 * Handle to the created menu item or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2482 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2483 HWND API dw_menu_append_item(HMENUI menux, const char *title, ULONG itemid, ULONG flags, int end, int check, HMENUI submenux)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2484 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2485 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2486 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2487
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2488 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2489 * Sets the state of a menu item check.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2490 * Deprecated; use dw_menu_item_set_state()
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2491 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2492 * menu: The handle the the existing menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2493 * id: Menuitem id.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2494 * check: TRUE for checked FALSE for not checked.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2495 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2496 void API dw_menu_item_set_check(HMENUI menux, unsigned long itemid, int check)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2497 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2498 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2499
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2500 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2501 * Sets the state of a menu item.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2502 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2503 * menu: The handle to the existing menu.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2504 * id: Menuitem id.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2505 * flags: DW_MIS_ENABLED/DW_MIS_DISABLED
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2506 * DW_MIS_CHECKED/DW_MIS_UNCHECKED
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2507 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2508 void API dw_menu_item_set_state(HMENUI menux, unsigned long itemid, unsigned long state)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2509 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2510 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2511
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2512 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2513 * Create a notebook object to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2514 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2515 * id: An ID to be used for getting the resource from the
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2516 * resource file.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2517 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2518 * Handle to the created notebook or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2519 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2520 HWND API dw_notebook_new(ULONG cid, int top)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2521 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2522 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2523 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2524
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2525 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2526 * Adds a new page to specified notebook.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2527 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2528 * handle: Window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2529 * flags: Any additional page creation flags.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2530 * front: If TRUE page is added at the beginning.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2531 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2532 * ID of newly created notebook page.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2533 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2534 unsigned long API dw_notebook_page_new(HWND handle, ULONG flags, int front)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2535 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2536 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2537 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2538
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2539 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2540 * Remove a page from a notebook.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2541 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2542 * handle: Handle to the notebook widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2543 * pageid: ID of the page to be destroyed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2544 */
2909
3fe7641f027c WARNING: Fix an API inconsistency in dw_notebook_page_destroy/set()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2906
diff changeset
2545 void API dw_notebook_page_destroy(HWND handle, unsigned long pageid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2546 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2547 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2548
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2549 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2550 * Queries the currently visible page ID.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2551 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2552 * handle: Handle to the notebook widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2553 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2554 * ID of visible notebook page.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2555 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2556 unsigned long API dw_notebook_page_get(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2557 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2558 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2559 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2560
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2561 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2562 * Sets the currently visible page ID.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2563 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2564 * handle: Handle to the notebook widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2565 * pageid: ID of the page to be made visible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2566 */
2909
3fe7641f027c WARNING: Fix an API inconsistency in dw_notebook_page_destroy/set()
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2906
diff changeset
2567 void API dw_notebook_page_set(HWND handle, unsigned long pageid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2568 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2569 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2570
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2571 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2572 * Sets the text on the specified notebook tab.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2573 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2574 * handle: Notebook handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2575 * pageid: Page ID of the tab to set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2576 * text: Pointer to the text to set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2577 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2578 void API dw_notebook_page_set_text(HWND handle, ULONG pageid, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2579 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2580 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2581
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2582 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2583 * Sets the text on the specified notebook tab status area.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2584 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2585 * handle: Notebook handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2586 * pageid: Page ID of the tab to set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2587 * text: Pointer to the text to set.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2588 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2589 void API dw_notebook_page_set_status_text(HWND handle, ULONG pageid, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2590 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2591 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2592
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2593 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2594 * Packs the specified box into the notebook page.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2595 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2596 * handle: Handle to the notebook to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2597 * pageid: Page ID in the notebook which is being packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2598 * page: Box handle to be packed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2599 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2600 void API dw_notebook_pack(HWND handle, ULONG pageid, HWND page)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2601 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2602 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2603
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2604 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2605 * Create a new Window Frame.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2606 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2607 * owner: The Owner's window handle or HWND_DESKTOP.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2608 * title: The Window title.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2609 * flStyle: Style flags.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2610 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2611 * Handle to the created window or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2612 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2613 HWND API dw_window_new(HWND hwndOwner, const char *title, ULONG flStyle)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2614 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2615 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2616 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2617
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2618 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2619 * Call a function from the window (widget)'s context (typically the message loop thread).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2620 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2621 * handle: Window handle of the widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2622 * function: Function pointer to be called.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2623 * data: Pointer to the data to be passed to the function.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2624 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2625 void API dw_window_function(HWND handle, void *function, void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2626 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2627 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2628
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2629
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2630 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2631 * Changes the appearance of the mouse pointer.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2632 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2633 * handle: Handle to widget for which to change.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2634 * cursortype: ID of the pointer you want.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2635 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2636 void API dw_window_set_pointer(HWND handle, int pointertype)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2637 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2638 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2639
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2640 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2641 * Makes the window visible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2642 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2643 * handle: The window handle to make visible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2644 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2645 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2646 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2647 int API dw_window_show(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2648 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2649 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2650 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2651
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2652 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2653 * Makes the window invisible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2654 * Parameters:
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2655 * handle: The window handle to hide.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2656 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2657 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2658 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2659 int API dw_window_hide(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2660 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2661 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2662 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2663
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2664 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2665 * Sets the colors used by a specified window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2666 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2667 * handle: The window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2668 * fore: Foreground color in DW_RGB format or a default color index.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2669 * back: Background color in DW_RGB format or a default color index.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2670 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2671 * DW_ERROR_NONE (0) on success.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2672 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2673 int API dw_window_set_color(HWND handle, ULONG fore, ULONG back)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2674 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2675 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2676 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2677
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2678 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2679 * Sets the border size of a specified window (widget) handle.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2680 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2681 * handle: The window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2682 * border: Size of the window border in pixels.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2683 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2684 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2685 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2686 int API dw_window_set_border(HWND handle, int border)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2687 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2688 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2689 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2690
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2691 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2692 * Sets the style of a given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2693 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2694 * handle: Window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2695 * style: Style features enabled or disabled.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2696 * mask: Corresponding bitmask of features to be changed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2697 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2698 void API dw_window_set_style(HWND handle, ULONG style, ULONG mask)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2699 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2700 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2701
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2702 /*
1797
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2703 * Sets the current focus item for a window/dialog.
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2704 * Parameters:
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2705 * handle: Handle to the dialog item to be focused.
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2706 * Remarks:
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2707 * This is for use after showing the window/dialog.
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2708 */
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2709 void API dw_window_set_focus(HWND handle)
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2710 {
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2711 }
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2712
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2713 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2714 * Sets the default focus item for a window/dialog.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2715 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2716 * window: Toplevel window or dialog.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2717 * defaultitem: Handle to the dialog item to be default.
1797
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2718 * Remarks:
2b30ff777eee Added dw_window_set_focus() to the template source file.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1769
diff changeset
2719 * This is for use before showing the window/dialog.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2720 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2721 void API dw_window_default(HWND handle, HWND defaultitem)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2722 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2723 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2724
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2725 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2726 * Sets window to click the default dialog item when an ENTER is pressed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2727 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2728 * window: Window (widget) to look for the ENTER press.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2729 * next: Window (widget) to move to next (or click)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2730 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2731 void API dw_window_click_default(HWND handle, HWND next)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2732 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2733 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2734
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2735 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2736 * Captures the mouse input to this window even if it is outside the bounds.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2737 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2738 * handle: Handle to receive mouse input.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2739 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2740 void API dw_window_capture(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2741 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2742 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2743
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2744 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2745 * Releases previous mouse capture.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2746 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2747 void API dw_window_release(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2748 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2749 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2750
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2751 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2752 * Changes a window's parent to newparent.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2753 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2754 * handle: The window handle to destroy.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2755 * newparent: The window's new parent window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2756 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2757 void API dw_window_reparent(HWND handle, HWND newparent)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2758 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2759 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2760
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2761 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2762 * Sets the font used by a specified window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2763 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2764 * handle: The window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2765 * fontname: Name and size of the font in the form "size.fontname"
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2766 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2767 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2768 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2769 int API dw_window_set_font(HWND handle, const char *fontname)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2770 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2771 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2772 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2773
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2774 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2775 * Returns the current font for the specified window.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2776 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2777 * handle: The window handle from which to obtain the font.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2778 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2779 * A malloc()ed font name string to be dw_free()ed or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2780 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2781 char * API dw_window_get_font(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2782 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2783 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2784 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2785
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2786 /* Allows the user to choose a font using the system's font chooser dialog.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2787 * Parameters:
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2788 * currfont: current font
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2789 * Returns:
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2790 * A malloced buffer with the selected font or NULL on error.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2791 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2792 char * API dw_font_choose(const char *currfont)
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2793 {
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2794 return NULL;
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2795 }
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2796
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2797 /*
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2798 * Sets the default font used on text based widgets.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2799 * Parameters:
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2800 * fontname: Font name in Dynamic Windows format.
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2801 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2802 void API dw_font_set_default(const char *fontname)
1089
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2803 {
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2804 }
b58032a619b9 Added new functions for 2.1 to the template, and updated the box packing examples to use the new unified method to reduce redundancy.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1010
diff changeset
2805
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2806 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2807 * Destroys a window and all of it's children.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2808 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2809 * handle: The window handle to destroy.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2810 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2811 * DW_ERROR_NONE (0) on success.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
2812 */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2813 int API dw_window_destroy(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2814 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2815 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2816 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2817
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2818 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2819 * Gets the text used for a given window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2820 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2821 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2822 * Returns:
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2823 * The text associsated with a given window or NULL on error.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2824 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2825 char * API dw_window_get_text(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2826 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2827 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2828 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2829
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2830 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2831 * Sets the text used for a given window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2832 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2833 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2834 * text: The text associsated with a given window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2835 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2836 void API dw_window_set_text(HWND handle, const char *text)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2837 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2838 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2839
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2840 /*
1389
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2841 * Sets the text used for a given window's floating bubble help.
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2842 * Parameters:
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2843 * handle: Handle to the window (widget).
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2844 * bubbletext: The text in the floating bubble tooltip.
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2845 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
2846 void API dw_window_set_tooltip(HWND handle, const char *bubbletext)
1389
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2847 {
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2848 }
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2849
0512fbb08abf Added dw_window_set_tooltip() for adding bubble help to most controls.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1384
diff changeset
2850 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2851 * Disables given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2852 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2853 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2854 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2855 void API dw_window_disable(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2856 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2857 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2858
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2859 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2860 * Enables given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2861 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2862 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2863 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2864 void API dw_window_enable(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2865 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2866 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2867
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2868 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2869 * Sets the bitmap used for a given static window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2870 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2871 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2872 * id: An ID to be used to specify the icon,
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2873 * (pass 0 if you use the filename param)
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2874 * data: memory buffer containing image (Bitmap on OS/2 or
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2875 * Windows and a pixmap on Unix, pass
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2876 * NULL if you use the id param)
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2877 * len: Length of data passed
2852
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2878 * Returns:
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2879 * DW_ERROR_NONE on success.
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2880 * DW_ERROR_UNKNOWN if the parameters were invalid.
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2881 * DW_ERROR_GENERAL if the bitmap was unable to be loaded.
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2882 */
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2883 int API dw_window_set_bitmap_from_data(HWND handle, unsigned long cid, const char *data, int len)
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2884 {
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2885 return DW_ERROR_UNKNOWN;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2886 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2887
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2888 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2889 * Sets the bitmap used for a given static window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2890 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2891 * handle: Handle to the window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2892 * id: An ID to be used to specify the icon,
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2893 * (pass 0 if you use the filename param)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2894 * filename: a path to a file (Bitmap on OS/2 or
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2895 * Windows and a pixmap on Unix, pass
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2896 * NULL if you use the id param)
2852
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2897 * Returns:
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2898 * DW_ERROR_NONE on success.
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2899 * DW_ERROR_UNKNOWN if the parameters were invalid.
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2900 * DW_ERROR_GENERAL if the bitmap was unable to be loaded.
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2901 */
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2902 int API dw_window_set_bitmap(HWND handle, unsigned long resid, const char *filename)
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2903 {
5018df4f952e Win/Android/Template: Add return values to dw_window_set_bitmap(_from_data).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2751
diff changeset
2904 return DW_ERROR_UNKNOWN;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2905 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2906
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2907 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2908 * Sets the icon used for a given window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2909 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2910 * handle: Handle to the window.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
2911 * icon: Handle to icon to be used.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2912 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2913 void API dw_window_set_icon(HWND handle, HICN icon)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2914 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2915 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2916
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2917 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2918 * Gets the child window handle with specified ID.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2919 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2920 * handle: Handle to the parent window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2921 * id: Integer ID of the child.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2922 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2923 * HWND of window with ID or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2924 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2925 HWND API dw_window_from_id(HWND handle, int id)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2926 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2927 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2928 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2929
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2930 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2931 * Minimizes or Iconifies a top-level window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2932 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2933 * handle: The window handle to minimize.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2934 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2935 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2936 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2937 int API dw_window_minimize(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2938 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2939 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2940 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2941
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2942 /* Causes entire window to be invalidated and redrawn.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2943 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2944 * handle: Toplevel window handle to be redrawn.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2945 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2946 void API dw_window_redraw(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2947 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2948 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2949
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2950 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2951 * Makes the window topmost.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2952 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2953 * handle: The window handle to make topmost.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2954 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2955 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2956 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2957 int API dw_window_raise(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2958 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2959 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2960 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2961
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2962 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2963 * Makes the window bottommost.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2964 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2965 * handle: The window handle to make bottommost.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2966 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2967 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2968 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2969 int API dw_window_lower(HWND handle)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2970 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2971 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2972 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2973
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2974 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2975 * Sets the size of a given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2976 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2977 * handle: Window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2978 * width: New width in pixels.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2979 * height: New height in pixels.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2980 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2981 void API dw_window_set_size(HWND handle, ULONG width, ULONG height)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2982 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2983 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2984
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
2985 /*
1429
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2986 * Gets the size the system thinks the widget should be.
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2987 * Parameters:
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2988 * handle: Window (widget) handle of the item to query.
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2989 * width: Width in pixels of the item or NULL if not needed.
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2990 * height: Height in pixels of the item or NULL if not needed.
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2991 */
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2992 void API dw_window_get_preferred_size(HWND handle, int *width, int *height)
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2993 {
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2994 }
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2995
fbaec6e5df63 Added dw_window_get_preferred_size() which attempts to determine the size the system wants for the widget. This is useful when creating nice looking layouts.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1389
diff changeset
2996 /*
1475
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
2997 * Sets the gravity of a given window (widget).
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
2998 * Gravity controls which corner of the screen and window the position is relative to.
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
2999 * Parameters:
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3000 * handle: Window (widget) handle.
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3001 * horz: DW_GRAV_LEFT (default), DW_GRAV_RIGHT or DW_GRAV_CENTER.
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3002 * vert: DW_GRAV_TOP (default), DW_GRAV_BOTTOM or DW_GRAV_CENTER.
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3003 */
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3004 void API dw_window_set_gravity(HWND handle, int horz, int vert)
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3005 {
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3006 }
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3007
e0212278f794 Added dw_window_set_gravity() to the template and readme.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1441
diff changeset
3008 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3009 * Sets the position of a given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3010 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3011 * handle: Window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3012 * x: X location from the bottom left.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3013 * y: Y location from the bottom left.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3014 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3015 void API dw_window_set_pos(HWND handle, LONG x, LONG y)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3016 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3017 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3018
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3019 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3020 * Sets the position and size of a given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3021 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3022 * handle: Window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3023 * x: X location from the bottom left.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3024 * y: Y location from the bottom left.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3025 * width: Width of the widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3026 * height: Height of the widget.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3027 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3028 void API dw_window_set_pos_size(HWND handle, LONG x, LONG y, ULONG width, ULONG height)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3029 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3030 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3031
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3032 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3033 * Gets the position and size of a given window (widget).
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3034 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3035 * handle: Window (widget) handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3036 * x: X location from the bottom left or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3037 * y: Y location from the bottom left or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3038 * width: Width of the widget or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3039 * height: Height of the widget or NULL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3040 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3041 void API dw_window_get_pos_size(HWND handle, LONG *x, LONG *y, ULONG *width, ULONG *height)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3042 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3043 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3044
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3045 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3046 * Returns the width of the screen.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3047 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3048 int API dw_screen_width(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3049 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3050 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3051 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3052
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3053 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3054 * Returns the height of the screen.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3055 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3056 int API dw_screen_height(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3057 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3058 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3059 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3060
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3061 /* This should return the current color depth. */
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3062 unsigned long API dw_color_depth_get(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3063 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3064 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3065 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3066
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3067 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3068 * Returns some information about the current operating environment.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3069 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3070 * env: Pointer to a DWEnv struct.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3071 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3072 void API dw_environment_query(DWEnv *env)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3073 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3074 strcpy(env->osName, "Unknown");
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3075
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3076 strcpy(env->buildDate, __DATE__);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3077 strcpy(env->buildTime, __TIME__);
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3078 env->DWMajorVersion = DW_MAJOR_VERSION;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3079 env->DWMinorVersion = DW_MINOR_VERSION;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3080 env->DWSubVersion = DW_SUB_VERSION;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3081
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3082 env->MajorVersion = 0; /* Operating system major */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3083 env->MinorVersion = 0; /* Operating system minor */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3084 env->MajorBuild = 0; /* Build versions... if available */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3085 env->MinorBuild = 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3086 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3087
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3088 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3089 * Emits a beep.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3090 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3091 * freq: Frequency.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3092 * dur: Duration.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3093 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3094 void API dw_beep(int freq, int dur)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3095 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3096 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3097
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3098 /* Call this after drawing to the screen to make sure
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3099 * anything you have drawn is visible.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3100 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3101 void API dw_flush(void)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3102 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3103 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3104
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3105 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3106 * Add a named user data item to a window handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3107 * Parameters:
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3108 * window: Window handle to save data to.
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3109 * dataname: A string pointer identifying which data to be saved.
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3110 * data: User data to be saved to the window handle.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3111 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3112 void API dw_window_set_data(HWND window, const char *dataname, void *data)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3113 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3114 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3115
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3116 /*
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3117 * Gets a named user data item from a window handle.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3118 * Parameters:
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3119 * window: Window handle to get data from.
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3120 * dataname: A string pointer identifying which data to get.
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3121 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3122 * Pointer to data or NULL if no data is available.
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3123 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3124 void * API dw_window_get_data(HWND window, const char *dataname)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3125 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3126 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3127 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3128
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3129 /*
2532
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3130 * Compare two window handles.
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3131 * Parameters:
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3132 * window1: First window handle to compare.
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3133 * window2: Second window handle to compare.
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3134 * Returns:
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3135 * TRUE if the windows are the same object, FALSE if not.
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3136 */
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3137 int API dw_window_compare(HWND window1, HWND window2)
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3138 {
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3139 /* If anything special is require to compare... do it
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3140 * here otherwise just compare the handles.
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3141 */
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3142 if(window1 && window2 && window1 == window2)
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3143 return TRUE;
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3144 return FALSE;
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3145 }
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3146
457c91634881 Added dw_window_compare() to check if two window handles refer to the same object.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2506
diff changeset
3147 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3148 * Add a callback to a timer event.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3149 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3150 * interval: Milliseconds to delay between calls.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3151 * sigfunc: The pointer to the function to be used as the callback.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3152 * data: User data to be passed to the handler function.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3153 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3154 * Timer ID for use with dw_timer_disconnect(), 0 on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3155 */
2584
2acc7ba5dea0 Add HTIMER type and change dw_timer_() functions to use it.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2532
diff changeset
3156 HTIMER API dw_timer_connect(int interval, void *sigfunc, void *data)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3157 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3158 return 0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3159 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3160
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3161 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3162 * Removes timer callback.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3163 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3164 * id: Timer ID returned by dw_timer_connect().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3165 */
2584
2acc7ba5dea0 Add HTIMER type and change dw_timer_() functions to use it.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2532
diff changeset
3166 void API dw_timer_disconnect(HTIMER timerid)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3167 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3168 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3169
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3170 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3171 * Add a callback to a window event.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3172 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3173 * window: Window handle of signal to be called back.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3174 * signame: A string pointer identifying which signal to be hooked.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3175 * sigfunc: The pointer to the function to be used as the callback.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3176 * data: User data to be passed to the handler function.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3177 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3178 void API dw_signal_connect(HWND window, const char *signame, void *sigfunc, void *data)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3179 {
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3180 dw_signal_connect_data(window, signame, sigfunc, NULL, data);
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3181 }
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3182
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3183 /*
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3184 * Add a callback to a window event with a closure callback.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3185 * Parameters:
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3186 * window: Window handle of signal to be called back.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3187 * signame: A string pointer identifying which signal to be hooked.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3188 * sigfunc: The pointer to the function to be used as the callback.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3189 * discfunc: The pointer to the function called when this handler is removed.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3190 * data: User data to be passed to the handler function.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3191 */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3192 void API dw_signal_connect_data(HWND window, const char *signame, void *sigfunc, void *discfunc, void *data)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3193 {
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3194 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3195
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3196 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3197 * Removes callbacks for a given window with given name.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3198 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3199 * window: Window handle of callback to be removed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3200 * signame: Signal name to be matched on window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3201 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3202 void API dw_signal_disconnect_by_name(HWND window, const char *signame)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3203 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3204 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3205
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3206 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3207 * Removes all callbacks for a given window.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3208 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3209 * window: Window handle of callback to be removed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3210 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3211 void API dw_signal_disconnect_by_window(HWND window)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3212 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3213 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3214
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3215 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3216 * Removes all callbacks for a given window with specified data.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3217 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3218 * window: Window handle of callback to be removed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3219 * data: Pointer to the data to be compared against.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3220 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3221 void API dw_signal_disconnect_by_data(HWND window, void *data)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3222 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3223 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3224
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3225 /* Open a shared library and return a handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3226 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3227 * name: Base name of the shared library.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3228 * handle: Pointer to a module handle,
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3229 * will be filled in with the handle.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3230 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3231 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3232 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3233 int API dw_module_load(const char *name, HMOD *handle)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3234 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3235 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3236 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3237
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3238 /* Queries the address of a symbol within open handle.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3239 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3240 * handle: Module handle returned by dw_module_load()
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3241 * name: Name of the symbol you want the address of.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3242 * func: A pointer to a function pointer, to obtain
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3243 * the address.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3244 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3245 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3246 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3247 int API dw_module_symbol(HMOD handle, const char *name, void**func)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3248 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3249 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3250 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3251
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3252 /* Frees the shared library previously opened.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3253 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3254 * handle: Module handle returned by dw_module_load()
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3255 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3256 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3257 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3258 int API dw_module_close(HMOD handle)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3259 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3260 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3261 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3262
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3263 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3264 * Returns the handle to an unnamed mutex semaphore or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3265 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3266 HMTX API dw_mutex_new(void)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3267 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3268 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3269 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3270
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3271 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3272 * Closes a semaphore created by dw_mutex_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3273 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3274 * mutex: The handle to the mutex returned by dw_mutex_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3275 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3276 void API dw_mutex_close(HMTX mutex)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3277 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3278 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3279
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3280 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3281 * Tries to gain access to the semaphore, if it can't it blocks.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3282 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3283 * mutex: The handle to the mutex returned by dw_mutex_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3284 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3285 void API dw_mutex_lock(HMTX mutex)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3286 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3287 #if 0
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3288 /* We need to handle locks from the main thread differently...
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3289 * since we can't stop message processing... otherwise we
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3290 * will deadlock... so try to acquire the lock and continue
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3291 * processing messages in between tries.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3292 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3293 if(_dw_thread == dw_thread_id())
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3294 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3295 while(/* Attempt to lock the mutex */)
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3296 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3297 /* Process any pending events */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3298 while(dw_main_iteration())
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3299 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3300 /* Just loop */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3301 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3302 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3303 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3304 else
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3305 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3306 /* Lock the mutex */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3307 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3308 #endif
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3309 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3310
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3311 /*
1158
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3312 * Tries to gain access to the semaphore.
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3313 * Parameters:
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3314 * mutex: The handle to the mutex returned by dw_mutex_new().
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3315 * Returns:
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3316 * DW_ERROR_NONE on success, DW_ERROR_TIMEOUT if it is already locked.
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3317 */
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3318 int API dw_mutex_trylock(HMTX mutex)
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3319 {
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3320 return DW_ERROR_GENERAL;
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3321 }
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3322
f86f556ff29d Added dw_mutex_trylock() that functions like dw_mutex_lock() except
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1152
diff changeset
3323 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3324 * Reliquishes the access to the semaphore.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3325 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3326 * mutex: The handle to the mutex returned by dw_mutex_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3327 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3328 void API dw_mutex_unlock(HMTX mutex)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3329 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3330 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3331
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3332 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3333 * Returns the handle to an unnamed event semaphore or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3334 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3335 HEV API dw_event_new(void)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3336 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3337 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3338 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3339
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3340 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3341 * Resets a semaphore created by dw_event_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3342 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3343 * eve: The handle to the event returned by dw_event_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3344 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3345 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3346 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3347 int API dw_event_reset (HEV eve)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3348 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3349 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3350 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3351
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3352 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3353 * Posts a semaphore created by dw_event_new(). Causing all threads
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3354 * waiting on this event in dw_event_wait to continue.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3355 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3356 * eve: The handle to the event returned by dw_event_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3357 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3358 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3359 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3360 int API dw_event_post (HEV eve)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3361 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3362 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3363 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3364
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3365 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3366 * Waits on a semaphore created by dw_event_new(), until the
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3367 * event gets posted or until the timeout expires.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3368 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3369 * eve: The handle to the event returned by dw_event_new().
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3370 * timeout: Number of milliseconds before timing out
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3371 * or -1 if indefinite.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3372 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3373 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3374 * DW_ERROR_TIMEOUT (2) if the timeout has expired.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3375 * Other values on other error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3376 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3377 int API dw_event_wait(HEV eve, unsigned long timeout)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3378 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3379 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3380 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3381
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3382 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3383 * Closes a semaphore created by dw_event_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3384 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3385 * eve: The handle to the event returned by dw_event_new().
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3386 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3387 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3388 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3389 int API dw_event_close(HEV *eve)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3390 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3391 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3392 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3393
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3394 /* Create a named event semaphore which can be
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3395 * opened from other processes.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3396 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3397 * name: Name given to semaphore which can be opened
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3398 * by other processes.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3399 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3400 * Handle to event semaphore or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3401 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3402 HEV API dw_named_event_new(const char *name)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3403 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3404 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3405 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3406
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3407 /* Open an already existing named event semaphore.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3408 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3409 * name: Name given to semaphore which can be opened
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3410 * by other processes.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3411 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3412 * Handle to event semaphore or NULL on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3413 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3414 HEV API dw_named_event_get(const char *name)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3415 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3416 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3417 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3418
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3419 /* Resets the event semaphore so threads who call wait
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3420 * on this semaphore will block.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3421 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3422 * eve: Handle to the semaphore obtained by
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3423 * an get or new call.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3424 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3425 * DW_ERROR_NONE (0) on success.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3426 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3427 int API dw_named_event_reset(HEV eve)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3428 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3429 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3430 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3431
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3432 /* Sets the posted state of an event semaphore, any threads
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3433 * waiting on the semaphore will no longer block.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3434 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3435 * eve: Handle to the semaphore obtained by
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3436 * an get or new call.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3437 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3438 * DW_ERROR_NONE (0) on success.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3439 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3440 int API dw_named_event_post(HEV eve)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3441 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3442 return DW_ERROR_GENERAL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3443 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3444
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3445 /* Waits on the specified semaphore until it becomes
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3446 * posted, or returns immediately if it already is posted.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3447 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3448 * eve: Handle to the semaphore obtained by
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3449 * an get or new call.
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3450 * timeout: Number of milliseconds before timing out
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3451 * or -1 if indefinite.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3452 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3453 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3454 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3455 int API dw_named_event_wait(HEV eve, unsigned long timeout)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3456 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3457 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3458 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3459
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3460 /* Release this semaphore, if there are no more open
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3461 * handles on this semaphore the semaphore will be destroyed.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3462 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3463 * eve: Handle to the semaphore obtained by
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3464 * an get or new call.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3465 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3466 * DW_ERROR_NONE (0) on success.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3467 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3468 int API dw_named_event_close(HEV eve)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3469 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3470 return DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3471 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3472
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3473 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3474 * Initializes the Dynamic Windows engine.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3475 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3476 * newthread: True if this is the only thread.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3477 * False if there is already a message loop running.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3478 * argc: Passed in from main()
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3479 * argv: Passed in from main()
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3480 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3481 * DW_ERROR_NONE (0) on success.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3482 */
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3483 int API dw_init(int newthread, int argc, char *argv[])
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3484 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3485 return DW_ERROR_NONE;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3486 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3487
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3488 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3489 * Allocates a shared memory region with a name.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3490 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3491 * dest: A pointer to a pointer to receive the memory address.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3492 * size: Size in bytes of the shared memory region to allocate.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3493 * name: A string pointer to a unique memory name.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3494 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3495 * Handle to shared memory or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3496 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3497 HSHM API dw_named_memory_new(void **dest, int size, const char *name)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3498 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3499 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3500 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3501
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3502 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3503 * Aquires shared memory region with a name.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3504 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3505 * dest: A pointer to a pointer to receive the memory address.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3506 * size: Size in bytes of the shared memory region to requested.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3507 * name: A string pointer to a unique memory name.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3508 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3509 * Handle to shared memory or NULL on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3510 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3511 HSHM API dw_named_memory_get(void **dest, int size, const char *name)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3512 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3513 return NULL;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3514 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3515
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3516 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3517 * Frees a shared memory region previously allocated.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3518 * Parameters:
1008
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3519 * handle: Handle obtained from dw_named_memory_new().
f046a2712b38 Fixes to errors in documentation comments while importing them into the help database.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1007
diff changeset
3520 * ptr: The memory address aquired with dw_named_memory_new().
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3521 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3522 * DW_ERROR_NONE (0) on success or DW_ERROR_UNKNOWN (-1) on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3523 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3524 int API dw_named_memory_free(HSHM handle, void *ptr)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3525 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3526 int rc = DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3527
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3528 return rc;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3529 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3530
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3531 /*
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3532 * Generally an internal function called from a newly created
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3533 * thread to setup the Dynamic Windows environment for the thread.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3534 * However it is exported so language bindings can call it when
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3535 * they create threads that require access to Dynamic Windows.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3536 */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3537 void API _dw_init_thread(void)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3538 {
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3539 }
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3540
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3541 /*
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3542 * Generally an internal function called from a terminating
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3543 * thread to cleanup the Dynamic Windows environment for the thread.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3544 * However it is exported so language bindings can call it when
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3545 * they exit threads that require access to Dynamic Windows.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3546 */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3547 void API _dw_deinit_thread(void)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3548 {
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3549 }
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3550
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3551 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3552 * Creates a new thread with a starting point of func.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3553 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3554 * func: Function which will be run in the new thread.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3555 * data: Parameter(s) passed to the function.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3556 * stack: Stack size of new thread (OS/2 and Windows only).
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3557 * Returns:
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3558 * Thread ID on success or DW_ERROR_UNKNOWN (-1) on error.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3559 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3560 DWTID API dw_thread_new(void *func, void *data, int stack)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3561 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3562 return (DWTID)DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3563 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3564
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3565 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3566 * Ends execution of current thread immediately.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3567 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3568 void API dw_thread_end(void)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3569 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3570 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3571
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3572 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3573 * Returns the current thread's ID.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3574 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3575 DWTID API dw_thread_id(void)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3576 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3577 return (DWTID)0;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3578 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3579
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3580 /*
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3581 * Cleanly terminates a DW session, should be signal handler safe.
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3582 */
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3583 void API dw_shutdown(void)
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3584 {
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3585 }
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3586
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3587 /*
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3588 * Execute and external program in a seperate session.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3589 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3590 * program: Program name with optional path.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3591 * type: Either DW_EXEC_CON or DW_EXEC_GUI.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3592 * params: An array of pointers to string arguements.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3593 * Returns:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3594 * Process ID on success or DW_ERROR_UNKNOWN (-1) on error.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3595 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3596 int API dw_exec(const char *program, int type, char **params)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3597 {
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3598 int ret = DW_ERROR_UNKNOWN;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3599
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3600 return ret;
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3601 }
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3602
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3603 /*
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3604 * Loads a web browser pointed at the given URL.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3605 * Parameters:
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3606 * url: Uniform resource locator.
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3607 * Returns:
1115
03cd2f3e929d Fixed a documentation and template error regarding dw_browse() return code.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1089
diff changeset
3608 * DW_ERROR_UNKNOWN (-1) on error; DW_ERROR_NONE (0) or a positive Process ID on success.
1010
9af693aafa93 Attempt at implmenting dw_window_get_font on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1008
diff changeset
3609 */
2226
2de088fb5dd4 Added some missing APIs from the template, and changes so it builds dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2225
diff changeset
3610 int API dw_browse(const char *url)
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3611 {
1115
03cd2f3e929d Fixed a documentation and template error regarding dw_browse() return code.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1089
diff changeset
3612 return DW_ERROR_UNKNOWN;
988
56077b50be7e Reset line endings to LF from CRLF
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 987
diff changeset
3613 }
1137
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3614
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3615 /*
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3616 * Creates a new print object.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3617 * Parameters:
1152
58b5374355ab Added print jobname parameter to dw_print_new().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1147
diff changeset
3618 * jobname: Name of the print job to show in the queue.
1137
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3619 * flags: Flags to initially configure the print object.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3620 * pages: Number of pages to print.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3621 * drawfunc: The pointer to the function to be used as the callback.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3622 * drawdata: User data to be passed to the handler function.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3623 * Returns:
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3624 * A handle to the print object or NULL on failure.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3625 */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3626 HPRINT API dw_print_new(const char *jobname, unsigned long flags, unsigned int pages, void *drawfunc, void *drawdata)
1137
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3627 {
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3628 return NULL;
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3629 }
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3630
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3631 /*
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3632 * Runs the print job, causing the draw page callbacks to fire.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3633 * Parameters:
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3634 * print: Handle to the print object returned by dw_print_new().
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3635 * flags: Flags to run the print job.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3636 * Returns:
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3637 * DW_ERROR_UNKNOWN on error or DW_ERROR_NONE on success.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3638 */
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3639 int API dw_print_run(HPRINT print, unsigned long flags)
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3640 {
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3641 return DW_ERROR_UNKNOWN;
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3642 }
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3643
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3644 /*
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3645 * Cancels the print job, typically called from a draw page callback.
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3646 * Parameters:
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3647 * print: Handle to the print object returned by dw_print_new().
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3648 */
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3649 void API dw_print_cancel(HPRINT print)
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3650 {
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3651 }
e24e5a13ff2c Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1117
diff changeset
3652
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3653 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3654 * Creates a new system notification if possible.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3655 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3656 * title: The short title of the notification.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3657 * imagepath: Path to an image to display or NULL if none.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3658 * description: A longer description of the notification,
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3659 * or NULL if none is necessary.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3660 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3661 * A handle to the notification which can be used to attach a "clicked" event if desired,
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3662 * or NULL if it fails or notifications are not supported by the system.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3663 * Remarks:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3664 * This will create a system notification that will show in the notifaction panel
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3665 * on supported systems, which may be clicked to perform another task.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3666 */
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3667 HWND API dw_notification_new(const char *title, const char *imagepath, const char *description, ...)
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3668 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3669 return 0;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3670 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3671
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3672 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3673 * Sends a notification created by dw_notification_new() after attaching signal handler.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3674 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3675 * notification: The handle to the notification returned by dw_notification_new().
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3676 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3677 * DW_ERROR_NONE on success, DW_ERROR_UNKNOWN on error or not supported.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3678 */
2227
d9e1865fcba9 Fix template so when compiled and run it does not crash.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2226
diff changeset
3679 int API dw_notification_send(HWND notification)
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3680 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3681 return DW_ERROR_UNKNOWN;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3682 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3683
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3684 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3685 * Converts a UTF-8 encoded string into a wide string.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3686 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3687 * utf8string: UTF-8 encoded source string.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3688 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3689 * Wide string that needs to be freed with dw_free()
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3690 * or NULL on failure.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3691 */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3692 wchar_t * API dw_utf8_to_wchar(const char *utf8string)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3693 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3694 return NULL;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3695 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3696
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3697 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3698 * Converts a wide string into a UTF-8 encoded string.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3699 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3700 * wstring: Wide source string.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3701 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3702 * UTF-8 encoded string that needs to be freed with dw_free()
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3703 * or NULL on failure.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3704 */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3705 char * API dw_wchar_to_utf8(const wchar_t *wstring)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3706 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3707 return NULL;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3708 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3709
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3710 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3711 * Gets the state of the requested library feature.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3712 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3713 * feature: The requested feature for example DW_FEATURE_DARK_MODE
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3714 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3715 * DW_FEATURE_UNSUPPORTED if the library or OS does not support the feature.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3716 * DW_FEATURE_DISABLED if the feature is supported but disabled.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3717 * DW_FEATURE_ENABLED if the feature is supported and enabled.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3718 * Other value greater than 1, same as enabled but with extra info.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3719 */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3720 int API dw_feature_get(DWFEATURE feature)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3721 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3722 switch(feature)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3723 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3724 #if 0
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3725 case DW_FEATURE_HTML: /* Supports the HTML Widget */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3726 case DW_FEATURE_HTML_RESULT: /* Supports the DW_SIGNAL_HTML_RESULT callback */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3727 case DW_FEATURE_WINDOW_BORDER: /* Supports custom window border sizes */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3728 case DW_FEATURE_WINDOW_TRANSPARENCY: /* Supports window frame transparency */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3729 case DW_FEATURE_DARK_MODE: /* Supports Dark Mode user interface */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3730 case DW_FEATURE_MLE_AUTO_COMPLETE: /* Supports auto completion in Multi-line Edit boxes */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3731 case DW_FEATURE_MLE_WORD_WRAP: /* Supports word wrapping in Multi-line Edit boxes */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3732 case DW_FEATURE_CONTAINER_STRIPE: /* Supports striped line display in container widgets */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3733 case DW_FEATURE_MDI: /* Supports Multiple Document Interface window frame */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3734 case DW_FEATURE_NOTEBOOK_STATUS_TEXT: /* Supports status text area on notebook/tabbed controls */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3735 case DW_FEATURE_NOTIFICATION: /* Supports sending system notifications */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3736 case DW_FEATURE_UTF8_UNICODE: /* Supports UTF8 encoded Unicode text */
2410
0286ac44d347 Add DW_FEATURE_TREE feature test, since iOS does not suppor tree.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2386
diff changeset
3737 case DW_FEATURE_MLE_RICH_EDIT: /* Supports Rich Edit based MLE control (Windows) */
0286ac44d347 Add DW_FEATURE_TREE feature test, since iOS does not suppor tree.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2386
diff changeset
3738 case DW_FEATURE_TASK_BAR: /* Supports icons in the taskbar or similar system widget */
2506
fa976a5bc7bd Add DW_FEATURE_WINDOW_PLACEMENT for platforms supporting arbitrary window placement.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2410
diff changeset
3739 case DW_FEATURE_TREE: /* Supports the Tree Widget */
fa976a5bc7bd Add DW_FEATURE_WINDOW_PLACEMENT for platforms supporting arbitrary window placement.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2410
diff changeset
3740 case DW_FEATURE_WINDOW_PLACEMENT: /* Supports arbitrary window placement */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3741 return DW_FEATURE_ENABLED;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3742 #endif
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3743 default:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3744 return DW_FEATURE_UNSUPPORTED;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3745 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3746 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3747
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3748 /*
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3749 * Sets the state of the requested library feature.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3750 * Parameters:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3751 * feature: The requested feature for example DW_FEATURE_DARK_MODE
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3752 * state: DW_FEATURE_DISABLED, DW_FEATURE_ENABLED or any value greater than 1.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3753 * Returns:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3754 * DW_FEATURE_UNSUPPORTED if the library or OS does not support the feature.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3755 * DW_ERROR_NONE if the feature is supported and successfully configured.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3756 * DW_ERROR_GENERAL if the feature is supported but could not be configured.
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3757 * Remarks:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3758 * These settings are typically used during dw_init() so issue before
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3759 * setting up the library with dw_init().
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3760 */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3761 int API dw_feature_set(DWFEATURE feature, int state)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3762 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3763 switch(feature)
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3764 {
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3765 /* These features are supported but not configurable */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3766 #if 0
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3767 case DW_FEATURE_HTML: /* Supports the HTML Widget */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3768 case DW_FEATURE_HTML_RESULT: /* Supports the DW_SIGNAL_HTML_RESULT callback */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3769 case DW_FEATURE_WINDOW_BORDER: /* Supports custom window border sizes */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3770 case DW_FEATURE_WINDOW_TRANSPARENCY: /* Supports window frame transparency */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3771 case DW_FEATURE_DARK_MODE: /* Supports Dark Mode user interface */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3772 case DW_FEATURE_MLE_AUTO_COMPLETE: /* Supports auto completion in Multi-line Edit boxes */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3773 case DW_FEATURE_MLE_WORD_WRAP: /* Supports word wrapping in Multi-line Edit boxes */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3774 case DW_FEATURE_CONTAINER_STRIPE: /* Supports striped line display in container widgets */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3775 case DW_FEATURE_MDI: /* Supports Multiple Document Interface window frame */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3776 case DW_FEATURE_NOTEBOOK_STATUS_TEXT: /* Supports status text area on notebook/tabbed controls */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3777 case DW_FEATURE_NOTIFICATION: /* Supports sending system notifications */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3778 case DW_FEATURE_UTF8_UNICODE: /* Supports UTF8 encoded Unicode text */
2410
0286ac44d347 Add DW_FEATURE_TREE feature test, since iOS does not suppor tree.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2386
diff changeset
3779 case DW_FEATURE_MLE_RICH_EDIT: /* Supports Rich Edit based MLE control (Windows) */
0286ac44d347 Add DW_FEATURE_TREE feature test, since iOS does not suppor tree.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2386
diff changeset
3780 case DW_FEATURE_TASK_BAR: /* Supports icons in the taskbar or similar system widget */
2506
fa976a5bc7bd Add DW_FEATURE_WINDOW_PLACEMENT for platforms supporting arbitrary window placement.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2410
diff changeset
3781 case DW_FEATURE_TREE: /* Supports the Tree Widget */
fa976a5bc7bd Add DW_FEATURE_WINDOW_PLACEMENT for platforms supporting arbitrary window placement.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2410
diff changeset
3782 case DW_FEATURE_WINDOW_PLACEMENT: /* Supports arbitrary window placement */
2225
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3783 return DW_ERROR_GENERAL;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3784 #endif
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3785 /* These features are supported and configurable */
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3786 default:
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3787 return DW_FEATURE_UNSUPPORTED;
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3788 }
1ec6300a627b Updated the platform template for the new 3.1 APIs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1797
diff changeset
3789 }