annotate mac/dw.c @ 510:710f82598210

Change function names to be inline with Mark Hessling's Rexx/DW.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 09 Mar 2004 03:27:39 +0000
parents 078a40ba2e41
children 80dbd5a1f403
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2 * Dynamic Windows:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3 * A GTK like implementation of the MacOS GUI
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
4 *
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
5 * (C) 2003 Brian Smith <dbsoft@technologist.com>
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
6 *
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
7 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
8 #include "dw.h"
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
9
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
10 static void _do_resize(Box *thisbox, int x, int y);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
11
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
12 typedef struct _sighandler
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
13 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
14 struct _sighandler *next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
15 ULONG message;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
16 HWND window;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
17 int id;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
18 void *signalfunction;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
19 void *data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
20
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
21 } SignalHandler;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
22
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
23 SignalHandler *Root = NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
24
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
25 typedef struct
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
26 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
27 ULONG message;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
28 char name[30];
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
29
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
30 } SignalList;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
31
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
32 const Rect CreationRect = { 0, 0, 2000, 1000 };
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
33 WindowRef CreationWindow = 0;
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
34 ControlRef RootControl = 0;
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
35
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
36 /* List of signals and their equivilent MacOS event */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
37 #define SIGNALMAX 15
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
38
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
39 SignalList SignalTranslate[SIGNALMAX] = {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
40 { nullEvent, DW_SIGNAL_CONFIGURE },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
41 { keyUp, DW_SIGNAL_KEY_PRESS },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
42 { mouseDown, DW_SIGNAL_BUTTON_PRESS },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
43 { mouseUp, DW_SIGNAL_BUTTON_RELEASE },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
44 { nullEvent, DW_SIGNAL_MOTION_NOTIFY },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
45 { nullEvent, DW_SIGNAL_DELETE },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
46 { updateEvt, DW_SIGNAL_EXPOSE },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
47 { nullEvent, DW_SIGNAL_CLICKED },
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
48 { nullEvent, DW_SIGNAL_ITEM_ENTER },
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
49 { nullEvent, DW_SIGNAL_ITEM_CONTEXT },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
50 { nullEvent, DW_SIGNAL_LIST_SELECT },
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
51 { nullEvent, DW_SIGNAL_ITEM_SELECT },
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
52 { activateEvt, DW_SIGNAL_SET_FOCUS },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
53 { nullEvent, DW_SIGNAL_VALUE_CHANGED },
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
54 { nullEvent, DW_SIGNAL_SWITCH_PAGE }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
55 };
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
56
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
57 /* This function adds a signal handler callback into the linked list.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
58 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
59 void _new_signal(ULONG message, HWND window, int id, void *signalfunction, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
60 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
61 SignalHandler *new = malloc(sizeof(SignalHandler));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
62
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
63 new->message = message;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
64 new->window = window;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
65 new->id = id;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
66 new->signalfunction = signalfunction;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
67 new->data = data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
68 new->next = NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
69
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
70 if (!Root)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
71 Root = new;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
72 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
73 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
74 SignalHandler *prev = NULL, *tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
75 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
76 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
77 if(tmp->message == message &&
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
78 tmp->window == window &&
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
79 tmp->signalfunction == signalfunction)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
80 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
81 tmp->data = data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
82 free(new);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
83 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
84 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
85 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
86 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
87 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
88 if(prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
89 prev->next = new;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
90 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
91 Root = new;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
92 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
93 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
94
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
95 /* Finds the message number for a given signal name */
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
96 static ULONG _findsigmessage(char *signame)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
97 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
98 int z;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
99
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
100 for(z=0;z<SIGNALMAX;z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
101 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
102 if(strcasecmp(signame, SignalTranslate[z].name) == 0)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
103 return SignalTranslate[z].message;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
104 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
105 return 0L;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
106 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
107
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
108 static void *_get_window_pointer(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
109 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
110 void *ret = NULL;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
111
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
112 if(IsValidWindowRef((WindowRef)handle))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
113 GetWindowProperty((WindowRef)handle, 0, 'user', sizeof(void *), NULL, &ret);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
114 else
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
115 GetControlProperty(handle, 0, 'user', sizeof(void *), NULL, &ret);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
116 return ret;
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
117 }
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
118
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
119 static void _set_window_pointer(HWND handle, void *pointer)
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
120 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
121 if(IsValidWindowRef((WindowRef)handle))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
122 SetWindowProperty((WindowRef)handle, 0, 'user', sizeof(void *), &pointer);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
123 else
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
124 SetControlProperty(handle, 0, 'user', sizeof(void *), &pointer);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
125 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
126
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
127 /* This function will recursively search a box and add up the total height of it */
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
128 static void _count_size(HWND box, int type, int *xsize, int *xorigsize)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
129 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
130 int size = 0, origsize = 0, z;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
131 Box *tmp = _get_window_pointer(box);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
132
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
133 if(!tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
134 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
135 *xsize = *xorigsize = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
136 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
137 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
138
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
139 if(type == tmp->type)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
140 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
141 /* If the box is going in the direction we want, then we
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
142 * return the entire sum of the items.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
143 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
144 for(z=0;z<tmp->count;z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
145 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
146 if(tmp->items[z].type == TYPEBOX)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
147 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
148 int s, os;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
149
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
150 _count_size(tmp->items[z].hwnd, type, &s, &os);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
151 size += s;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
152 origsize += os;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
153 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
154 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
155 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
156 size += (type == DW_HORZ ? tmp->items[z].width : tmp->items[z].height);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
157 origsize += (type == DW_HORZ ? tmp->items[z].origwidth : tmp->items[z].origheight);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
158 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
159 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
160 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
161 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
162 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
163 /* If the box is not going in the direction we want, then we only
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
164 * want to return the maximum value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
165 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
166 int tmpsize = 0, tmporigsize = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
167
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
168 for(z=0;z<tmp->count;z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
169 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
170 if(tmp->items[z].type == TYPEBOX)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
171 _count_size(tmp->items[z].hwnd, type, &tmpsize, &tmporigsize);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
172 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
173 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
174 tmpsize = (type == DW_HORZ ? tmp->items[z].width : tmp->items[z].height);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
175 tmporigsize = (type == DW_HORZ ? tmp->items[z].origwidth : tmp->items[z].origheight);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
176 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
177
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
178 if(tmpsize > size)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
179 size = tmpsize;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
180 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
181 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
182
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
183 *xsize = size;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
184 *xorigsize = origsize;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
185 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
186
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
187 /* This function calculates how much space the widgets and boxes require
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
188 * and does expansion as necessary.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
189 */
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
190 static int _resize_box(Box *thisbox, int *depth, int x, int y, int *usedx, int *usedy,
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
191 int pass, int *usedpadx, int *usedpady)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
192 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
193 int z, currentx = 0, currenty = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
194 int uymax = 0, uxmax = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
195 int upymax = 0, upxmax = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
196 /* Used for the SIZEEXPAND */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
197 int nux = *usedx, nuy = *usedy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
198 int nupx = *usedpadx, nupy = *usedpady;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
199
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
200 (*usedx) += (thisbox->pad * 2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
201 (*usedy) += (thisbox->pad * 2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
202
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
203 for(z=0;z<thisbox->count;z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
204 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
205 if(thisbox->items[z].type == TYPEBOX)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
206 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
207 int initialx, initialy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
208 Box *tmp = _get_window_pointer(thisbox->items[z].hwnd);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
209
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
210 initialx = x - (*usedx);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
211 initialy = y - (*usedy);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
212
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
213 if(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
214 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
215 int newx, newy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
216 int nux = *usedx, nuy = *usedy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
217 int upx = *usedpadx + (tmp->pad*2), upy = *usedpady + (tmp->pad*2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
218
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
219 /* On the second pass we know how big the box needs to be and how
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
220 * much space we have, so we can calculate a ratio for the new box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
221 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
222 if(pass == 2)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
223 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
224 int deep = *depth + 1;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
225
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
226 _resize_box(tmp, &deep, x, y, &nux, &nuy, 1, &upx, &upy);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
227
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
228 tmp->upx = upx - *usedpadx;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
229 tmp->upy = upy - *usedpady;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
230
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
231 newx = x - nux;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
232 newy = y - nuy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
233
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
234 tmp->width = thisbox->items[z].width = initialx - newx;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
235 tmp->height = thisbox->items[z].height = initialy - newy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
236
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
237 tmp->parentxratio = thisbox->xratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
238 tmp->parentyratio = thisbox->yratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
239
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
240 tmp->parentpad = tmp->pad;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
241
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
242 /* Just in case */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
243 tmp->xratio = thisbox->xratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
244 tmp->yratio = thisbox->yratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
245
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
246 if(thisbox->type == DW_VERT)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
247 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
248 if((thisbox->items[z].width-((thisbox->items[z].pad*2)+(tmp->pad*2)))!=0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
249 tmp->xratio = ((float)((thisbox->items[z].width * thisbox->xratio)-((thisbox->items[z].pad*2)+(tmp->pad*2))))/((float)(thisbox->items[z].width-((thisbox->items[z].pad*2)+(tmp->pad*2))));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
250 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
251 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
252 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
253 if((thisbox->items[z].width-tmp->upx)!=0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
254 tmp->xratio = ((float)((thisbox->items[z].width * thisbox->xratio)-tmp->upx))/((float)(thisbox->items[z].width-tmp->upx));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
255 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
256 if(thisbox->type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
257 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
258 if((thisbox->items[z].height-((thisbox->items[z].pad*2)+(tmp->pad*2)))!=0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
259 tmp->yratio = ((float)((thisbox->items[z].height * thisbox->yratio)-((thisbox->items[z].pad*2)+(tmp->pad*2))))/((float)(thisbox->items[z].height-((thisbox->items[z].pad*2)+(tmp->pad*2))));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
260 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
261 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
262 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
263 if((thisbox->items[z].height-tmp->upy)!=0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
264 tmp->yratio = ((float)((thisbox->items[z].height * thisbox->yratio)-tmp->upy))/((float)(thisbox->items[z].height-tmp->upy));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
265 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
266
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
267 nux = *usedx; nuy = *usedy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
268 upx = *usedpadx + (tmp->pad*2); upy = *usedpady + (tmp->pad*2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
269 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
270
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
271 (*depth)++;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
272
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
273 _resize_box(tmp, depth, x, y, &nux, &nuy, pass, &upx, &upy);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
274
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
275 (*depth)--;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
276
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
277 newx = x - nux;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
278 newy = y - nuy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
279
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
280 tmp->minwidth = thisbox->items[z].width = initialx - newx;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
281 tmp->minheight = thisbox->items[z].height = initialy - newy;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
282 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
283 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
284
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
285 if(pass > 1 && *depth > 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
286 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
287 if(thisbox->type == DW_VERT)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
288 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
289 if((thisbox->minwidth-((thisbox->items[z].pad*2)+(thisbox->parentpad*2))) == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
290 thisbox->items[z].xratio = 1.0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
291 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
292 thisbox->items[z].xratio = ((float)((thisbox->width * thisbox->parentxratio)-((thisbox->items[z].pad*2)+(thisbox->parentpad*2))))/((float)(thisbox->minwidth-((thisbox->items[z].pad*2)+(thisbox->parentpad*2))));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
293 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
294 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
295 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
296 if(thisbox->minwidth-thisbox->upx == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
297 thisbox->items[z].xratio = 1.0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
298 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
299 thisbox->items[z].xratio = ((float)((thisbox->width * thisbox->parentxratio)-thisbox->upx))/((float)(thisbox->minwidth-thisbox->upx));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
300 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
301
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
302 if(thisbox->type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
303 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
304 if((thisbox->minheight-((thisbox->items[z].pad*2)+(thisbox->parentpad*2))) == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
305 thisbox->items[z].yratio = 1.0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
306 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
307 thisbox->items[z].yratio = ((float)((thisbox->height * thisbox->parentyratio)-((thisbox->items[z].pad*2)+(thisbox->parentpad*2))))/((float)(thisbox->minheight-((thisbox->items[z].pad*2)+(thisbox->parentpad*2))));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
308 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
309 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
310 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
311 if(thisbox->minheight-thisbox->upy == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
312 thisbox->items[z].yratio = 1.0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
313 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
314 thisbox->items[z].yratio = ((float)((thisbox->height * thisbox->parentyratio)-thisbox->upy))/((float)(thisbox->minheight-thisbox->upy));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
315 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
316
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
317 if(thisbox->items[z].type == TYPEBOX)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
318 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
319 Box *tmp = _get_window_pointer(thisbox->items[z].hwnd);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
320
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
321 if(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
322 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
323 tmp->parentxratio = thisbox->items[z].xratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
324 tmp->parentyratio = thisbox->items[z].yratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
325 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
326 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
327 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
328 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
329 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
330 thisbox->items[z].xratio = thisbox->xratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
331 thisbox->items[z].yratio = thisbox->yratio;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
332 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
333
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
334 if(thisbox->type == DW_VERT)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
335 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
336 if((thisbox->items[z].width + (thisbox->items[z].pad*2)) > uxmax)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
337 uxmax = (thisbox->items[z].width + (thisbox->items[z].pad*2));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
338 if(thisbox->items[z].hsize != SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
339 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
340 if(((thisbox->items[z].pad*2) + thisbox->items[z].width) > upxmax)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
341 upxmax = (thisbox->items[z].pad*2) + thisbox->items[z].width;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
342 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
343 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
344 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
345 if(thisbox->items[z].pad*2 > upxmax)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
346 upxmax = thisbox->items[z].pad*2;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
347 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
348 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
349 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
350 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
351 if(thisbox->items[z].width == -1)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
352 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
353 /* figure out how much space this item requires */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
354 /* thisbox->items[z].width = */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
355 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
356 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
357 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
358 (*usedx) += thisbox->items[z].width + (thisbox->items[z].pad*2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
359 if(thisbox->items[z].hsize != SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
360 (*usedpadx) += (thisbox->items[z].pad*2) + thisbox->items[z].width;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
361 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
362 (*usedpadx) += thisbox->items[z].pad*2;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
363 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
364 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
365 if(thisbox->type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
366 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
367 if((thisbox->items[z].height + (thisbox->items[z].pad*2)) > uymax)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
368 uymax = (thisbox->items[z].height + (thisbox->items[z].pad*2));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
369 if(thisbox->items[z].vsize != SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
370 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
371 if(((thisbox->items[z].pad*2) + thisbox->items[z].height) > upymax)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
372 upymax = (thisbox->items[z].pad*2) + thisbox->items[z].height;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
373 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
374 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
375 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
376 if(thisbox->items[z].pad*2 > upymax)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
377 upymax = thisbox->items[z].pad*2;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
378 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
379 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
380 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
381 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
382 if(thisbox->items[z].height == -1)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
383 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
384 /* figure out how much space this item requires */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
385 /* thisbox->items[z].height = */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
386 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
387 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
388 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
389 (*usedy) += thisbox->items[z].height + (thisbox->items[z].pad*2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
390 if(thisbox->items[z].vsize != SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
391 (*usedpady) += (thisbox->items[z].pad*2) + thisbox->items[z].height;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
392 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
393 (*usedpady) += thisbox->items[z].pad*2;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
394 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
395 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
396 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
397
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
398 (*usedx) += uxmax;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
399 (*usedy) += uymax;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
400 (*usedpadx) += upxmax;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
401 (*usedpady) += upymax;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
402
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
403 currentx += thisbox->pad;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
404 currenty += thisbox->pad;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
405
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
406 /* The second pass is for expansion and actual placement. */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
407 if(pass > 1)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
408 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
409 /* Any SIZEEXPAND items should be set to uxmax/uymax */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
410 for(z=0;z<thisbox->count;z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
411 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
412 if(thisbox->items[z].hsize == SIZEEXPAND && thisbox->type == DW_VERT)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
413 thisbox->items[z].width = uxmax-(thisbox->items[z].pad*2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
414 if(thisbox->items[z].vsize == SIZEEXPAND && thisbox->type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
415 thisbox->items[z].height = uymax-(thisbox->items[z].pad*2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
416 /* Run this code segment again to finalize the sized after setting uxmax/uymax values. */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
417 if(thisbox->items[z].type == TYPEBOX)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
418 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
419 Box *tmp = _get_window_pointer(thisbox->items[z].hwnd);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
420
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
421 if(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
422 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
423 if(*depth > 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
424 {
425
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
425 float calcval;
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
426
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
427 if(thisbox->type == DW_VERT)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
428 {
425
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
429 calcval = (float)(tmp->minwidth-((thisbox->items[z].pad*2)+(thisbox->pad*2)));
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
430 if(calcval == 0.0)
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
431 tmp->xratio = thisbox->xratio;
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
432 else
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
433 tmp->xratio = ((float)((thisbox->items[z].width * thisbox->xratio)-((thisbox->items[z].pad*2)+(thisbox->pad*2))))/calcval;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
434 tmp->width = thisbox->items[z].width;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
435 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
436 if(thisbox->type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
437 {
425
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
438 calcval = (float)(tmp->minheight-((thisbox->items[z].pad*2)+(thisbox->pad*2)));
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
439 if(calcval == 0.0)
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
440 tmp->yratio = thisbox->yratio;
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
441 else
4fe2df53ec9f Division by zero fix in the layout engine.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 418
diff changeset
442 tmp->yratio = ((float)((thisbox->items[z].height * thisbox->yratio)-((thisbox->items[z].pad*2)+(thisbox->pad*2))))/calcval;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
443 tmp->height = thisbox->items[z].height;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
444 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
445 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
446
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
447 (*depth)++;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
448
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
449 _resize_box(tmp, depth, x, y, &nux, &nuy, 3, &nupx, &nupy);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
450
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
451 (*depth)--;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
452
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
453 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
454 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
455 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
456
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
457 for(z=0;z<(thisbox->count);z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
458 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
459 int height = thisbox->items[z].height;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
460 int width = thisbox->items[z].width;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
461 int pad = thisbox->items[z].pad;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
462 HWND handle = thisbox->items[z].hwnd;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
463 int vectorx, vectory;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
464
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
465 /* When upxmax != pad*2 then ratios are incorrect. */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
466 vectorx = (int)((width*thisbox->items[z].xratio)-width);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
467 vectory = (int)((height*thisbox->items[z].yratio)-height);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
468
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
469 if(width > 0 && height > 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
470 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
471 /* This is a hack to fix rounding of the sizing */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
472 if(*depth == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
473 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
474 vectorx++;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
475 vectory++;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
476 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
477
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
478 /* If this item isn't going to expand... reset the vectors to 0 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
479 if(thisbox->items[z].vsize != SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
480 vectory = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
481 if(thisbox->items[z].hsize != SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
482 vectorx = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
483
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
484 MoveControl(handle, currentx + pad, currenty + pad);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
485 SizeControl(handle, width + vectorx, height + vectory);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
486
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
487 if(thisbox->type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
488 currentx += width + vectorx + (pad * 2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
489 if(thisbox->type == DW_VERT)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
490 currenty += height + vectory + (pad * 2);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
491 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
492 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
493 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
494 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
495 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
496
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
497 static void _do_resize(Box *thisbox, int x, int y)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
498 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
499 if(x != 0 && y != 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
500 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
501 if(thisbox)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
502 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
503 int usedx = 0, usedy = 0, usedpadx = 0, usedpady = 0, depth = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
504
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
505 _resize_box(thisbox, &depth, x, y, &usedx, &usedy, 1, &usedpadx, &usedpady);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
506
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
507 if(usedx-usedpadx == 0 || usedy-usedpady == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
508 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
509
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
510 thisbox->xratio = ((float)(x-usedpadx))/((float)(usedx-usedpadx));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
511 thisbox->yratio = ((float)(y-usedpady))/((float)(usedy-usedpady));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
512
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
513 usedx = usedy = usedpadx = usedpady = depth = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
514
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
515 _resize_box(thisbox, &depth, x, y, &usedx, &usedy, 2, &usedpadx, &usedpady);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
516 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
517 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
518 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
519
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
520 static int _dw_int_pos(HWND hwnd)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
521 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
522 int pos = (int)dw_window_get_data(hwnd, "_dw_percent_value");
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
523 int range = dw_percent_get_range(hwnd);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
524 float fpos = (float)pos;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
525 float frange = (float)range;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
526 float fnew = (fpos/1000.0)*frange;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
527 return (int)fnew;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
528 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
529
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
530 static void _dw_int_set(HWND hwnd, int pos)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
531 {
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
532 int inew, range = dw_percent_get_range(hwnd);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
533 if(range)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
534 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
535 float fpos = (float)pos;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
536 float frange = (float)range;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
537 float fnew = (fpos/frange)*1000.0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
538 inew = (int)fnew;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
539 dw_window_set_data(hwnd, "_dw_percent_value", (void *)inew);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
540 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
541 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
542
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
543 static void _changebox(Box *thisbox, int percent, int type)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
544 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
545 int z;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
546
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
547 for(z=0;z<thisbox->count;z++)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
548 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
549 if(thisbox->items[z].type == TYPEBOX)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
550 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
551 Box *tmp = _get_window_pointer(thisbox->items[z].hwnd);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
552 _changebox(tmp, percent, type);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
553 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
554 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
555 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
556 if(type == DW_HORZ)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
557 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
558 if(thisbox->items[z].hsize == SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
559 thisbox->items[z].width = (int)(((float)thisbox->items[z].origwidth) * (((float)percent)/((float)100.0)));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
560 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
561 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
562 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
563 if(thisbox->items[z].vsize == SIZEEXPAND)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
564 thisbox->items[z].height = (int)(((float)thisbox->items[z].origheight) * (((float)percent)/((float)100.0)));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
565 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
566 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
567 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
568 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
569
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
570 /* Main MacOS Message loop, all events are handled here. */
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
571 static void _doEvents(EventRecord *eventStrucPtr)
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
572 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
573 SignalHandler *tmp = Root;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
574
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
575 while(tmp)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
576 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
577 if(tmp->message == eventStrucPtr->what)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
578 {
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
579 switch(eventStrucPtr->what)
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
580 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
581 case mouseDown:
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
582 break;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
583 case mouseUp:
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
584 break;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
585 case keyDown:
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
586 break;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
587 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
588 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
589 if(tmp)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
590 tmp = tmp->next;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
591 }
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
592 }
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
593
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
594 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
595 * Initializes the Dynamic Windows engine.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
596 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
597 * newthread: True if this is the only thread.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
598 * False if there is already a message loop running.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
599 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
600 int API dw_init(int newthread, int argc, char *argv[])
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
601 {
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
602 CreateNewWindow (kDocumentWindowClass, 0,
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
603 &CreationRect, &CreationWindow);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
604 CreateRootControl(CreationWindow, &RootControl);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
605 HideWindow(CreationWindow);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
606 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
607 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
608
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
609 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
610 * Runs a message loop for Dynamic Windows.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
611 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
612 void API dw_main(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
613 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
614 EventRecord eventStructure;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
615 int gDone = false;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
616
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
617 while(!gDone)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
618 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
619 if(WaitNextEvent(everyEvent, &eventStructure, 180, 0))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
620 _doEvents(&eventStructure);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
621 }
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
622 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
623
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
624 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
625 * Runs a message loop for Dynamic Windows, for a period of milliseconds.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
626 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
627 * milliseconds: Number of milliseconds to run the loop for.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
628 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
629 void API dw_main_sleep(int milliseconds)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
630 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
631 double start = (double)clock();
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
632
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
633 while(((((clock() - start) / CLOCKS_PER_SEC)/1000)) <= milliseconds)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
634 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
635 EventRecord eventStructure;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
636 if(WaitNextEvent(everyEvent, &eventStructure, 1, 0))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
637 _doEvents(&eventStructure);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
638 }
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
639 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
640
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
641 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
642 * Processes a single message iteration and returns.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
643 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
644 void API dw_main_iteration(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
645 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
646 EventRecord eventStructure;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
647
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
648 if(WaitNextEvent(everyEvent, &eventStructure, 0, 0))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
649 _doEvents(&eventStructure);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
650 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
651
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
652 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
653 * Free's memory allocated by dynamic windows.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
654 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
655 * ptr: Pointer to dynamic windows allocated
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
656 * memory to be free()'d.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
657 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
658 void API dw_free(void *ptr)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
659 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
660 free(ptr);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
661 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
662
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
663 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
664 * Allocates and initializes a dialog struct.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
665 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
666 * data: User defined data to be passed to functions.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
667 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
668 DWDialog * API dw_dialog_new(void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
669 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
670 DWDialog *tmp = malloc(sizeof(DWDialog));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
671
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
672 tmp->eve = dw_event_new();
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
673 dw_event_reset(tmp->eve);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
674 tmp->data = data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
675 tmp->done = FALSE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
676 tmp->result = NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
677
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
678 return tmp;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
679 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
680
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
681 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
682 * Accepts a dialog struct and returns the given data to the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
683 * initial called of dw_dialog_wait().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
684 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
685 * dialog: Pointer to a dialog struct aquired by dw_dialog_new).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
686 * result: Data to be returned by dw_dialog_wait().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
687 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
688 int API dw_dialog_dismiss(DWDialog *dialog, void *result)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
689 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
690 dialog->result = result;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
691 dw_event_post(dialog->eve);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
692 dialog->done = TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
693 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
694 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
695
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
696 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
697 * Accepts a dialog struct waits for dw_dialog_dismiss() to be
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
698 * called by a signal handler with the given dialog struct.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
699 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
700 * dialog: Pointer to a dialog struct aquired by dw_dialog_new).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
701 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
702 void * API dw_dialog_wait(DWDialog *dialog)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
703 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
704 void *tmp;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
705 EventRecord eventStructure;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
706
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
707 while(!dialog->done)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
708 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
709 if(WaitNextEvent(everyEvent, &eventStructure, 180, 0))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
710 _doEvents(&eventStructure);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
711 }
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
712 dw_event_close(&dialog->eve);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
713 tmp = dialog->result;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
714 free(dialog);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
715 return tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
716 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
717
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
718
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
719 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
720 * Displays a Message Box with given text and title..
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
721 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
722 * title: The title of the message box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
723 * format: printf style format string.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
724 * ...: Additional variables for use in the format.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
725 */
413
2e6c28ee4794 Skeletal changes to the MacOS file, this would be a good starting point
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 387
diff changeset
726 int API dw_messagebox(char *title, int flags, char *format, ...)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
727 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
728 va_list args;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
729 char outbuf[1024];
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
730 AlertStdCFStringAlertParamRec param;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
731 DialogRef dialog;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
732 CFStringRef cftext, cftitle;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
733 DialogItemIndex item;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
734 int ret = DW_MB_RETURN_OK;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
735 AlertType alert = kAlertPlainAlert;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
736
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
737 va_start(args, format);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
738 vsprintf(outbuf, format, args);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
739 va_end(args);
441
b559c06a76c2 Implemented more functionality on MacOS and include the platform define
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 437
diff changeset
740
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
741 GetStandardAlertDefaultParams(&param, kStdCFStringAlertVersionOne);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
742 param.movable = TRUE;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
743 param.helpButton = FALSE;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
744 if(flags & DW_MB_INFORMATION)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
745 alert = kAlertNoteAlert;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
746 else if(flags & DW_MB_ERROR)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
747 alert = kAlertStopAlert;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
748 else if(flags & DW_MB_WARNING)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
749 alert = kAlertCautionAlert;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
750
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
751 if(flags & DW_MB_OK || flags & DW_MB_OKCANCEL)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
752 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
753 param.defaultText = CFSTR("Ok");
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
754 param.cancelText = flags & DW_MB_OK ? 0 : CFSTR("Cancel");
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
755 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
756 else
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
757 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
758 param.defaultText = CFSTR("Yes");
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
759 param.cancelText = CFSTR("No");
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
760 param.otherText = CFSTR("Cancel");
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
761 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
762 cftext = CFStringCreateWithCString(NULL, outbuf, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
763 cftitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
764 if(CreateStandardAlert(alert, cftext, cftitle, &param, &dialog) == noErr)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
765 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
766 if(RunStandardAlert(dialog, NULL, &item) == noErr)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
767 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
768 if(item == kAlertStdAlertOtherButton)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
769 ret = DW_MB_RETURN_CANCEL;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
770 else if(item == kAlertStdAlertCancelButton)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
771 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
772 if(flags & DW_MB_OK || flags & DW_MB_OKCANCEL)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
773 ret = DW_MB_RETURN_CANCEL;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
774 else
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
775 ret = DW_MB_RETURN_NO;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
776 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
777 else if(item == kAlertStdAlertOKButton)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
778 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
779 if(flags & DW_MB_YESNO || flags & DW_MB_YESNOCANCEL)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
780 ret = DW_MB_RETURN_YES;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
781 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
782 }
441
b559c06a76c2 Implemented more functionality on MacOS and include the platform define
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 437
diff changeset
783 }
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
784 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
785 CFRelease(cftitle);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
786 return ret;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
787 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
788
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
789 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
790 * Makes the window topmost.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
791 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
792 * handle: The window handle to make topmost.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
793 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
794 int API dw_window_raise(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
795 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
796 BringToFront((WindowRef)handle);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
797 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
798 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
799
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
800 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
801 * Makes the window bottommost.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
802 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
803 * handle: The window handle to make bottommost.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
804 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
805 int API dw_window_lower(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
806 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
807 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
808 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
809
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
810 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
811 * Makes the window visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
812 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
813 * handle: The window handle to make visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
814 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
815 int API dw_window_show(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
816 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
817 ShowWindow((WindowRef)handle);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
818 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
819 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
820
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
821 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
822 * Minimizes or Iconifies a top-level window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
823 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
824 * handle: The window handle to minimize.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
825 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
826 int API dw_window_minimize(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
827 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
828 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
829 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
830
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
831 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
832 * Makes the window invisible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
833 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
834 * handle: The window handle to make visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
835 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
836 int API dw_window_hide(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
837 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
838 HideWindow((WindowRef)handle);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
839 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
840 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
841
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
842 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
843 * Destroys a window and all of it's children.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
844 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
845 * handle: The window handle to destroy.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
846 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
847 int API dw_window_destroy(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
848 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
849 DisposeWindow((WindowRef)handle);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
850 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
851 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
852
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
853 /* Causes entire window to be invalidated and redrawn.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
854 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
855 * handle: Toplevel window handle to be redrawn.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
856 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
857 void API dw_window_redraw(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
858 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
859 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
860
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
861 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
862 * Changes a window's parent to newparent.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
863 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
864 * handle: The window handle to destroy.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
865 * newparent: The window's new parent window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
866 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
867 void API dw_window_reparent(HWND handle, HWND newparent)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
868 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
869 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
870
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
871 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
872 * Sets the font used by a specified window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
873 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
874 * handle: The window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
875 * fontname: Name and size of the font in the form "size.fontname"
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
876 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
877 int API dw_window_set_font(HWND handle, char *fontname)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
878 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
879 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
880 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
881
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
882 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
883 * Sets the colors used by a specified window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
884 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
885 * handle: The window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
886 * fore: Foreground color in DW_RGB format or a default color index.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
887 * back: Background color in DW_RGB format or a default color index.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
888 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
889 int API dw_window_set_color(HWND handle, ULONG fore, ULONG back)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
890 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
891 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
892 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
893
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
894 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
895 * Sets the font used by a specified window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
896 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
897 * handle: The window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
898 * border: Size of the window border in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
899 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
900 int API dw_window_set_border(HWND handle, int border)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
901 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
902 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
903 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
904
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
905 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
906 * Captures the mouse input to this window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
907 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
908 * handle: Handle to receive mouse input.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
909 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
910 void API dw_window_capture(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
911 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
912 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
913
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
914 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
915 * Releases previous mouse capture.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
916 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
917 void API dw_window_release(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
918 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
919 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
920
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
921 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
922 * Tracks this window movement.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
923 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
924 * handle: Handle to frame to be tracked.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
925 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
926 void API dw_window_track(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
927 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
928 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
929
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
930 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
931 * Changes the appearance of the mouse pointer.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
932 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
933 * handle: Handle to widget for which to change.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
934 * cursortype: ID of the pointer you want.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
935 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
936 void API dw_window_set_pointer(HWND handle, int pointertype)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
937 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
938 SetCursor(*GetCursor(pointertype));
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
939 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
940
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
941 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
942 * Create a new Window Frame.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
943 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
944 * owner: The Owner's window handle or HWND_DESKTOP.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
945 * title: The Window title.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
946 * flStyle: Style flags, see the PM reference.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
947 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
948 HWND API dw_window_new(HWND hwndOwner, char *title, ULONG flStyle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
949 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
950 WindowRef hwnd = 0;
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
951 ControlRef rootcontrol = 0;
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
952
418
4be57ee7e006 Fix a crash in dw_window_pointer when the window handle is HWND_DESKTOP.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 413
diff changeset
953 CreateNewWindow (kDocumentWindowClass, flStyle,
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
954 &CreationRect, &hwnd);
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
955 CreateRootControl(hwnd, &rootcontrol);
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
956 dw_window_set_text((HWND)hwnd, title);
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
957 return (HWND)hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
958 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
959
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
960 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
961 * Create a new Box to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
962 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
963 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
964 * pad: Number of pixels to pad around the box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
965 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
966 HWND API dw_box_new(int type, int pad)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
967 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
968 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
969 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
970
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
971 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
972 * Create a new Group Box to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
973 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
974 * type: Either DW_VERT (vertical) or DW_HORZ (horizontal).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
975 * pad: Number of pixels to pad around the box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
976 * title: Text to be displayined in the group outline.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
977 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
978 HWND API dw_groupbox_new(int type, int pad, char *title)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
979 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
980 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
981 CreateRadioGroupControl(CreationWindow, &CreationRect, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
982 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
983 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
984
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
985 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
986 * Create a new MDI Frame to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
987 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
988 * id: An ID to be used with dw_window_from_id or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
989 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
990 HWND API dw_mdi_new(unsigned long id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
991 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
992 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
993 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
994
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
995 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
996 * Create a bitmap object to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
997 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
998 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
999 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1000 HWND API dw_bitmap_new(ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1001 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1002 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1003 CreateImageWellControl(CreationWindow, &CreationRect, NULL, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1004 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1005 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1006
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1007 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1008 * Create a notebook object to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1009 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1010 * id: An ID to be used for getting the resource from the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1011 * resource file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1012 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1013 HWND API dw_notebook_new(ULONG id, int top)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1014 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1015 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1016 CreateTabsControl(CreationWindow, &CreationRect, kControlTabSizeSmall, kControlTabDirectionNorth, 1, NULL, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1017 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1018 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1019
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1020 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1021 * Create a menu object to be popped up.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1022 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1023 * id: An ID to be used for getting the resource from the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1024 * resource file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1025 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1026 HMENUI API dw_menu_new(ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1027 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1028 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1029 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1030
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1031 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1032 * Create a menubar on a window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1033 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1034 * location: Handle of a window frame to be attached to.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1035 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1036 HMENUI API dw_menubar_new(HWND location)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1037 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1038 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1039 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1040
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1041 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1042 * Destroys a menu created with dw_menubar_new or dw_menu_new.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1043 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1044 * menu: Handle of a menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1045 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1046 void API dw_menu_destroy(HMENUI *menu)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1047 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1048 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1049
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1050 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1051 * Adds a menuitem or submenu to an existing menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1052 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1053 * menu: The handle the the existing menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1054 * title: The title text on the menu item to be added.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1055 * id: An ID to be used for message passing.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1056 * flags: Extended attributes to set on the menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1057 * end: If TRUE memu is positioned at the end of the menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1058 * check: If TRUE menu is "check"able.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1059 * submenu: Handle to an existing menu to be a submenu or NULL.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1060 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1061 HWND API dw_menu_append_item(HMENUI menux, char *title, ULONG id, ULONG flags, int end, int check, HMENUI submenu)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1062 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1063 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1064 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1065
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1066 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1067 * Sets the state of a menu item check.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1068 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1069 * menu: The handle the the existing menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1070 * id: Menuitem id.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1071 * check: TRUE for checked FALSE for not checked.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1072 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1073 void API dw_menu_item_set_check(HMENUI menux, unsigned long id, int check)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1074 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1075 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1076
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1077 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1078 * Pops up a context menu at given x and y coordinates.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1079 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1080 * menu: The handle the the existing menu.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1081 * parent: Handle to the window initiating the popup.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1082 * x: X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1083 * y: Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1084 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1085 void API dw_menu_popup(HMENUI *menu, HWND parent, int x, int y)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1086 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1087 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1088
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1089 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1090 * Returns the current X and Y coordinates of the mouse pointer.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1091 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1092 * x: Pointer to variable to store X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1093 * y: Pointer to variable to store Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1094 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1095 void API dw_pointer_query_pos(long *x, long *y)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1096 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1097 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1098
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1099 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1100 * Sets the X and Y coordinates of the mouse pointer.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1101 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1102 * x: X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1103 * y: Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1104 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1105 void API dw_pointer_set_pos(long x, long y)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1106 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1107 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1108
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1109
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1110 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1111 * Create a container object to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1112 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1113 * id: An ID to be used for getting the resource from the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1114 * resource file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1115 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1116 HWND API dw_container_new(ULONG id, int multi)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1117 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1118 ListHandle hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1119 Point CellSize;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1120 ListDefSpec def;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1121
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1122 SetPt(&CellSize, 52, 52);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1123 /*def.u.userProc = listDefinitionFunctionUPP;*/
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1124
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1125 CreateCustomList(&CreationRect, &CreationRect, CellSize, &def, CreationWindow, TRUE, TRUE, TRUE, TRUE, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1126 return (HWND)hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1127 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1128
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1129 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1130 * Create a tree object to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1131 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1132 * id: An ID to be used for getting the resource from the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1133 * resource file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1134 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1135 HWND API dw_tree_new(ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1136 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
1137 return dw_container_new(id, FALSE);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1138 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1139
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1140 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1141 * Create a new static text window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1142 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1143 * text: The text to be display by the static text widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1144 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1145 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1146 HWND API dw_text_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1147 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1148 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1149 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1150 CreateStaticTextControl (CreationWindow, &CreationRect, cftext, NULL, &hwnd);
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
1151 CFRelease(cftext);
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1152 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1153 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1154
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1155 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1156 * Create a new status text window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1157 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1158 * text: The text to be display by the static text widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1159 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1160 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1161 HWND API dw_status_text_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1162 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1163 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1164 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1165 CreateStaticTextControl (CreationWindow, &CreationRect, cftext, NULL, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1166 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1167 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1168 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1169
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1170 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1171 * Create a new Multiline Editbox window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1172 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1173 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1174 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1175 HWND API dw_mle_new(ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1176 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1177 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1178 CreateScrollingTextBoxControl(CreationWindow, &CreationRect, id, FALSE, 0, 0, 0, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1179 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1180 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1181
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1182 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1183 * Create a new Entryfield window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1184 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1185 * text: The default text to be in the entryfield widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1186 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1187 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1188 HWND API dw_entryfield_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1189 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1190 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1191 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1192 CreateEditTextControl(CreationWindow, &CreationRect, cftext, FALSE, FALSE, NULL, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1193 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1194 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1195 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1196
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1197 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1198 * Create a new Entryfield (password) window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1199 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1200 * text: The default text to be in the entryfield widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1201 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1202 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1203 HWND API dw_entryfield_password_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1204 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1205 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1206 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1207 CreateEditTextControl(CreationWindow, &CreationRect, cftext, TRUE, FALSE, NULL, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1208 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1209 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1210 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1211
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1212 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1213 * Create a new Combobox window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1214 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1215 * text: The default text to be in the combpbox widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1216 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1217 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1218 HWND API dw_combobox_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1219 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1220 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1221 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1222
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1223 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1224 * Create a new button window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1225 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1226 * text: The text to be display by the static text widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1227 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1228 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1229 HWND API dw_button_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1230 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1231 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1232 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1233 CreatePushButtonControl(CreationWindow, &CreationRect, cftext, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1234 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1235 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1236 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1237
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1238 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1239 * Create a new bitmap button window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1240 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1241 * text: Bubble help text to be displayed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1242 * id: An ID of a bitmap in the resource file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1243 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1244 HWND API dw_bitmapbutton_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1245 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1246 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1247 CreatePushButtonWithIconControl(CreationWindow, &CreationRect, 0, NULL, kControlPushButtonIconOnLeft, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1248 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1249 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1250
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1251 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1252 * Create a new bitmap button window (widget) to be packed from a file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1253 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1254 * text: Bubble help text to be displayed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1255 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1256 * filename: Name of the file, omit extention to have
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1257 * DW pick the appropriate file extension.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1258 * (BMP on OS/2 or Windows, XPM on Unix)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1259 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1260 HWND dw_bitmapbutton_new_from_file(char *text, unsigned long id, char *filename)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1261 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1262 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1263 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1264
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1265 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1266 * Create a new spinbutton window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1267 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1268 * text: The text to be display by the static text widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1269 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1270 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1271 HWND API dw_spinbutton_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1272 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1273 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1274 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1275
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1276 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1277 * Create a new radiobutton window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1278 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1279 * text: The text to be display by the static text widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1280 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1281 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1282 HWND API dw_radiobutton_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1283 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1284 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1285 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1286 CreateRadioButtonControl(CreationWindow, &CreationRect, cftext, 0, FALSE, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1287 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1288 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1289 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1290
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1291
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1292 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1293 * Create a new slider window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1294 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1295 * vertical: TRUE or FALSE if slider is vertical.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1296 * increments: Number of increments available.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1297 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1298 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1299 HWND API dw_slider_new(int vertical, int increments, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1300 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1301 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1302 CreateSliderControl(CreationWindow, &CreationRect, 0, 0, increments, kControlSliderDoesNotPoint, 0, FALSE, 0, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1303 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1304 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1305
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1306 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1307 * Create a new scrollbar window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1308 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1309 * vertical: TRUE or FALSE if scrollbar is vertical.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1310 * increments: Number of increments available.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1311 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1312 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1313 HWND API dw_scrollbar_new(int vertical, int increments, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1314 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1315 HWND hwnd;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1316 CreateScrollBarControl(CreationWindow, &CreationRect, 0, 0, increments, increments, FALSE, 0, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1317 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1318 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1319
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1320 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1321 * Create a new percent bar window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1322 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1323 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1324 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1325 HWND API dw_percent_new(ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1326 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1327 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1328 CreateProgressBarControl(CreationWindow, &CreationRect, 0, 0, 100, FALSE, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1329 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1330 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1331
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1332 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1333 * Create a new checkbox window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1334 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1335 * text: The text to be display by the static text widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1336 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1337 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1338 HWND API dw_checkbox_new(char *text, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1339 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1340 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1341 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1342 CreateCheckBoxControl(CreationWindow, &CreationRect, cftext, 0, TRUE, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1343 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1344 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1345 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1346
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1347 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1348 * Create a new listbox window (widget) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1349 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1350 * id: An ID to be used with dw_window_from_id() or 0L.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1351 * multi: Multiple select TRUE or FALSE.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1352 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1353 HWND API dw_listbox_new(ULONG id, int multi)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1354 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1355 HWND hwnd = 0;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1356 CreateListBoxControl(CreationWindow, &CreationRect, TRUE, 0, 1, FALSE, TRUE, 50, 50, TRUE, NULL, &hwnd);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1357 return hwnd;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1358 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1359
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1360 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1361 * Sets the icon used for a given window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1362 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1363 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1364 * id: An ID to be used to specify the icon.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1365 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1366 void API dw_window_set_icon(HWND handle, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1367 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1368 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1369
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1370 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1371 * Sets the bitmap used for a given static window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1372 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1373 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1374 * id: An ID to be used to specify the icon,
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1375 * (pass 0 if you use the filename param)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1376 * filename: a path to a file (Bitmap on OS/2 or
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1377 * Windows and a pixmap on Unix, pass
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1378 * NULL if you use the id param)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1379 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1380 void API dw_window_set_bitmap(HWND handle, unsigned long id, char *filename)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1381 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1382 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1383
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1384 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1385 * Sets the text used for a given window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1386 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1387 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1388 * text: The text associsated with a given window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1389 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1390 void API dw_window_set_text(HWND handle, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1391 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1392 CFStringRef cftext = CFStringCreateWithCString(NULL, text, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1393 if(IsValidWindowRef((WindowRef)handle))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1394 SetWindowTitleWithCFString((WindowRef)handle, cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1395 else
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1396 SetControlTitleWithCFString(handle, cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1397 CFRelease(cftext);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1398 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1399
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1400 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1401 * Gets the text used for a given window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1402 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1403 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1404 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1405 * text: The text associsated with a given window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1406 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1407 char * API dw_window_get_text(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1408 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1409 CFStringRef cftext;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1410 char *ret = NULL;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1411
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1412 if(IsValidWindowRef((WindowRef)handle))
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1413 CopyWindowTitleAsCFString((WindowRef)handle, &cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1414 else
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1415 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1416 Str255 str;
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
1417
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1418 GetControlTitle(handle, str);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1419 cftext = CFStringCreateWithPascalString(NULL, str, CFStringGetSystemEncoding());
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1420 }
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1421
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1422 if(cftext)
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1423 {
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1424 int length = CFStringGetLength(cftext) + 1;
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1425 char *ret = malloc(length);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1426 CFStringGetCString(cftext, ret, length, kCFStringEncodingDOSLatinUS);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1427 CFRelease(cftext);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1428 }
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
1429 return ret;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1430 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1431
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1432 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1433 * Disables given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1434 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1435 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1436 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1437 void API dw_window_disable(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1438 {
418
4be57ee7e006 Fix a crash in dw_window_pointer when the window handle is HWND_DESKTOP.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 413
diff changeset
1439 DisableControl(handle);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1440 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1441
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1442 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1443 * Enables given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1444 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1445 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1446 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1447 void API dw_window_enable(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1448 {
418
4be57ee7e006 Fix a crash in dw_window_pointer when the window handle is HWND_DESKTOP.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 413
diff changeset
1449 EnableControl(handle);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1450 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1451
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1452 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1453 * Gets the child window handle with specified ID.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1454 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1455 * handle: Handle to the parent window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1456 * id: Integer ID of the child.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1457 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1458 HWND API dw_window_from_id(HWND handle, int id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1459 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
1460 HWND ret = 0;
418
4be57ee7e006 Fix a crash in dw_window_pointer when the window handle is HWND_DESKTOP.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 413
diff changeset
1461
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
1462 #if 0
418
4be57ee7e006 Fix a crash in dw_window_pointer when the window handle is HWND_DESKTOP.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 413
diff changeset
1463 ControlID cid = (ControlID)id;
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
1464 GetControlByID((WindowRef)handle, &cid, &ret);
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
1465 #endif
418
4be57ee7e006 Fix a crash in dw_window_pointer when the window handle is HWND_DESKTOP.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 413
diff changeset
1466 return ret;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1467 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1468
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1469 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1470 * Pack windows (widgets) into a box from the end (or bottom).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1471 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1472 * box: Window handle of the box to be packed into.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1473 * item: Window handle of the item to be back.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1474 * width: Width in pixels of the item or -1 to be self determined.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1475 * height: Height in pixels of the item or -1 to be self determined.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1476 * hsize: TRUE if the window (widget) should expand horizontally to fill space given.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1477 * vsize: TRUE if the window (widget) should expand vertically to fill space given.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1478 * pad: Number of pixels of padding around the item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1479 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1480 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1481 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1482 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1483
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1484 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1485 * Sets the size of a given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1486 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1487 * handle: Window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1488 * width: New width in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1489 * height: New height in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1490 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1491 void API dw_window_set_size(HWND handle, ULONG width, ULONG height)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1492 {
443
e99cd6e45c0b Need to have a application package directory for binaries to properly run
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 441
diff changeset
1493 SizeWindow((WindowRef)handle, (short)width, (short)height, TRUE);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1494 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1495
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1496 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1497 * Returns the width of the screen.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1498 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1499 int API dw_screen_width(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1500 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1501 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1502 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1503
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1504 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1505 * Returns the height of the screen.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1506 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1507 int API dw_screen_height(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1508 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1509 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1510 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1511
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1512 /* This should return the current color depth */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1513 unsigned long API dw_color_depth(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1514 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1515 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1516 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1517
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1518
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1519 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1520 * Sets the position of a given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1521 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1522 * handle: Window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1523 * x: X location from the bottom left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1524 * y: Y location from the bottom left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1525 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1526 void API dw_window_set_pos(HWND handle, ULONG x, ULONG y)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1527 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1528 MoveWindow((WindowRef)handle, (short)x, (short)y, FALSE);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1529 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1530
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1531 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1532 * Sets the position and size of a given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1533 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1534 * handle: Window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1535 * x: X location from the bottom left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1536 * y: Y location from the bottom left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1537 * width: Width of the widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1538 * height: Height of the widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1539 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1540 void API dw_window_set_pos_size(HWND handle, ULONG x, ULONG y, ULONG width, ULONG height)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1541 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
1542 dw_window_set_pos(handle, x, y);
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1543 dw_window_set_size(handle, width, height);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1544 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1545
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1546 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1547 * Gets the position and size of a given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1548 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1549 * handle: Window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1550 * x: X location from the bottom left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1551 * y: Y location from the bottom left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1552 * width: Width of the widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1553 * height: Height of the widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1554 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1555 void API dw_window_get_pos_size(HWND handle, ULONG *x, ULONG *y, ULONG *width, ULONG *height)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1556 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1557 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1558
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1559 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1560 * Sets the style of a given window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1561 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1562 * handle: Window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1563 * width: New width in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1564 * height: New height in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1565 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1566 void API dw_window_set_style(HWND handle, ULONG style, ULONG mask)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1567 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1568 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1569
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1570 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1571 * Adds a new page to specified notebook.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1572 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1573 * handle: Window (widget) handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1574 * flags: Any additional page creation flags.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1575 * front: If TRUE page is added at the beginning.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1576 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1577 unsigned long API dw_notebook_page_new(HWND handle, ULONG flags, int front)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1578 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1579 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1580 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1581
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1582 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1583 * Remove a page from a notebook.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1584 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1585 * handle: Handle to the notebook widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1586 * pageid: ID of the page to be destroyed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1587 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1588 void API dw_notebook_page_destroy(HWND handle, unsigned int pageid)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1589 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1590 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1591
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1592 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1593 * Queries the currently visible page ID.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1594 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1595 * handle: Handle to the notebook widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1596 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1597 unsigned long API dw_notebook_page_get(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1598 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1599 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1600 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1601
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1602 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1603 * Sets the currently visibale page ID.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1604 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1605 * handle: Handle to the notebook widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1606 * pageid: ID of the page to be made visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1607 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1608 void API dw_notebook_page_set(HWND handle, unsigned int pageid)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1609 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1610 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1611
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1612 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1613 * Sets the text on the specified notebook tab.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1614 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1615 * handle: Notebook handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1616 * pageid: Page ID of the tab to set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1617 * text: Pointer to the text to set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1618 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1619 void API dw_notebook_page_set_text(HWND handle, ULONG pageid, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1620 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1621 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1622
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1623 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1624 * Sets the text on the specified notebook tab status area.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1625 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1626 * handle: Notebook handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1627 * pageid: Page ID of the tab to set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1628 * text: Pointer to the text to set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1629 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1630 void API dw_notebook_page_set_status_text(HWND handle, ULONG pageid, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1631 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1632 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1633
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1634 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1635 * Packs the specified box into the notebook page.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1636 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1637 * handle: Handle to the notebook to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1638 * pageid: Page ID in the notebook which is being packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1639 * page: Box handle to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1640 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1641 void API dw_notebook_pack(HWND handle, ULONG pageid, HWND page)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1642 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1643 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1644
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1645 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1646 * Appends the specified text to the listbox's (or combobox) entry list.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1647 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1648 * handle: Handle to the listbox to be appended to.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1649 * text: Text to append into listbox.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1650 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1651 void API dw_listbox_append(HWND handle, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1652 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1653 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1654
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1655 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1656 * Clears the listbox's (or combobox) list of all entries.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1657 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1658 * handle: Handle to the listbox to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1659 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1660 void API dw_listbox_clear(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1661 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1662 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1663
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1664 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1665 * Returns the listbox's item count.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1666 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1667 * handle: Handle to the listbox to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1668 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1669 int API dw_listbox_count(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1670 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1671 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1672 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1673
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1674 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1675 * Sets the topmost item in the viewport.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1676 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1677 * handle: Handle to the listbox to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1678 * top: Index to the top item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1679 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1680 void API dw_listbox_set_top(HWND handle, int top)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1681 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1682 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1683
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1684 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1685 * Copies the given index item's text into buffer.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1686 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1687 * handle: Handle to the listbox to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1688 * index: Index into the list to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1689 * buffer: Buffer where text will be copied.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1690 * length: Length of the buffer (including NULL).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1691 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1692 void API dw_listbox_get_text(HWND handle, unsigned int index, char *buffer, unsigned int length)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1693 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1694 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1695
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1696 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1697 * Sets the text of a given listbox entry.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1698 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1699 * handle: Handle to the listbox to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1700 * index: Index into the list to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1701 * buffer: Buffer where text will be copied.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1702 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1703 void API dw_listbox_set_text(HWND handle, unsigned int index, char *buffer)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1704 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1705 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1706
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1707 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1708 * Returns the index to the item in the list currently selected.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1709 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1710 * handle: Handle to the listbox to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1711 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1712 unsigned int API dw_listbox_selected(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1713 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1714 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1715 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1716
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1717 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1718 * Returns the index to the current selected item or -1 when done.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1719 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1720 * handle: Handle to the listbox to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1721 * where: Either the previous return or -1 to restart.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1722 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1723 int API dw_listbox_selected_multi(HWND handle, int where)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1724 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1725 return -1;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1726 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1727
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1728 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1729 * Sets the selection state of a given index.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1730 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1731 * handle: Handle to the listbox to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1732 * index: Item index.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1733 * state: TRUE if selected FALSE if unselected.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1734 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1735 void API dw_listbox_select(HWND handle, int index, int state)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1736 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1737 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1738
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1739 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1740 * Deletes the item with given index from the list.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1741 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1742 * handle: Handle to the listbox to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1743 * index: Item index.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1744 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1745 void API dw_listbox_delete(HWND handle, int index)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1746 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1747 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1748
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1749 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1750 * Adds text to an MLE box and returns the current point.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1751 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1752 * handle: Handle to the MLE to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1753 * buffer: Text buffer to be imported.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1754 * startpoint: Point to start entering text.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1755 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1756 unsigned int API dw_mle_import(HWND handle, char *buffer, int startpoint)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1757 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1758 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1759 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1760
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1761 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1762 * Grabs text from an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1763 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1764 * handle: Handle to the MLE to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1765 * buffer: Text buffer to be exported.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1766 * startpoint: Point to start grabbing text.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1767 * length: Amount of text to be grabbed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1768 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1769 void API dw_mle_export(HWND handle, char *buffer, int startpoint, int length)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1770 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1771 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1772
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1773 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1774 * Obtains information about an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1775 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1776 * handle: Handle to the MLE to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1777 * bytes: A pointer to a variable to return the total bytes.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1778 * lines: A pointer to a variable to return the number of lines.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1779 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1780 void API dw_mle_get_size(HWND handle, unsigned long *bytes, unsigned long *lines)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1781 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1782 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1783
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1784 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1785 * Deletes text from an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1786 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1787 * handle: Handle to the MLE to be deleted from.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1788 * startpoint: Point to start deleting text.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1789 * length: Amount of text to be deleted.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1790 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1791 void API dw_mle_delete(HWND handle, int startpoint, int length)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1792 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1793 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1794
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1795 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1796 * Clears all text from an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1797 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1798 * handle: Handle to the MLE to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1799 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1800 void API dw_mle_clear(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1801 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1802 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1803
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1804 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1805 * Sets the visible line of an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1806 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1807 * handle: Handle to the MLE to be positioned.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1808 * line: Line to be visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1809 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1810 void API dw_mle_set_cursor_visible(HWND handle, int line)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1811 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1812 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1813
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1814 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1815 * Sets the editablity of an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1816 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1817 * handle: Handle to the MLE.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1818 * state: TRUE if it can be edited, FALSE for readonly.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1819 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1820 void API dw_mle_set_cursor_editable(HWND handle, int state)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1821 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1822 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1823
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1824 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1825 * Sets the word wrap state of an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1826 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1827 * handle: Handle to the MLE.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1828 * state: TRUE if it wraps, FALSE if it doesn't.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1829 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1830 void API dw_mle_set_cursor_word_wrap(HWND handle, int state)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1831 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1832 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1833
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1834 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1835 * Sets the current cursor position of an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1836 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1837 * handle: Handle to the MLE to be positioned.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1838 * point: Point to position cursor.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1839 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1840 void API dw_mle_set_cursor(HWND handle, int point)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1841 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1842 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1843
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1844 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1845 * Finds text in an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1846 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1847 * handle: Handle to the MLE to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1848 * text: Text to search for.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1849 * point: Start point of search.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1850 * flags: Search specific flags.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1851 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1852 int API dw_mle_search(HWND handle, char *text, int point, unsigned long flags)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1853 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1854 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1855 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1856
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1857 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1858 * Stops redrawing of an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1859 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1860 * handle: Handle to the MLE to freeze.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1861 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1862 void API dw_mle_freeze(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1863 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1864 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1865
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1866 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1867 * Resumes redrawing of an MLE box.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1868 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1869 * handle: Handle to the MLE to thaw.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1870 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1871 void API dw_mle_thaw(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1872 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1873 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1874
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1875 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1876 * Returns the range of the percent bar.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1877 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1878 * handle: Handle to the percent bar to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1879 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1880 unsigned int API dw_percent_get_range(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1881 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1882 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1883 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1884
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1885 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1886 * Sets the percent bar position.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1887 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1888 * handle: Handle to the percent bar to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1889 * position: Position of the percent bar withing the range.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1890 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1891 void API dw_percent_set_pos(HWND handle, unsigned int position)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1892 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1893 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1894
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1895 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1896 * Returns the position of the slider.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1897 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1898 * handle: Handle to the slider to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1899 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1900 unsigned int API dw_slider_get_pos(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1901 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1902 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1903 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1904
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1905 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1906 * Sets the slider position.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1907 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1908 * handle: Handle to the slider to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1909 * position: Position of the slider withing the range.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1910 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1911 void API dw_slider_set_pos(HWND handle, unsigned int position)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1912 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1913 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1914
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1915 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1916 * Returns the position of the scrollbar.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1917 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1918 * handle: Handle to the scrollbar to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1919 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1920 unsigned int API dw_scrollbar_get_pos(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1921 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1922 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1923 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1924
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1925 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1926 * Sets the scrollbar position.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1927 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1928 * handle: Handle to the scrollbar to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1929 * position: Position of the scrollbar withing the range.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1930 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1931 void API dw_scrollbar_set_pos(HWND handle, unsigned int position)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1932 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1933 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1934
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1935 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1936 * Sets the scrollbar range.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1937 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1938 * handle: Handle to the scrollbar to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1939 * range: Maximum range value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1940 * visible: Visible area relative to the range.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1941 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1942 void API dw_scrollbar_set_range(HWND handle, unsigned int range, unsigned int visible)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1943 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1944 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1945
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1946 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1947 * Sets the spinbutton value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1948 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1949 * handle: Handle to the spinbutton to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1950 * position: Current value of the spinbutton.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1951 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1952 void API dw_spinbutton_set_pos(HWND handle, long position)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1953 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1954 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1955
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1956 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1957 * Sets the spinbutton limits.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1958 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1959 * handle: Handle to the spinbutton to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1960 * upper: Upper limit.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1961 * lower: Lower limit.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1962 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1963 void API dw_spinbutton_set_limits(HWND handle, long upper, long lower)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1964 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1965 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1966
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1967 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1968 * Sets the entryfield character limit.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1969 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1970 * handle: Handle to the spinbutton to be set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1971 * limit: Number of characters the entryfield will take.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1972 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1973 void API dw_entryfield_set_limit(HWND handle, ULONG limit)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1974 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1975 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1976
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1977
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1978 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1979 * Returns the current value of the spinbutton.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1980 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1981 * handle: Handle to the spinbutton to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1982 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1983 long API dw_spinbutton_get_pos(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1984 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1985 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1986 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1987
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1988 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1989 * Returns the state of the checkbox.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1990 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1991 * handle: Handle to the checkbox to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1992 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
1993 int API dw_checkbox_get(HWND handle)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1994 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1995 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1996 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1997
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1998 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1999 * Sets the state of the checkbox.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2000 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2001 * handle: Handle to the checkbox to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2002 * value: TRUE for checked, FALSE for unchecked.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2003 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2004 void API dw_checkbox_set(HWND handle, int value)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2005 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2006 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2007
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2008 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2009 * Inserts an item into a tree window (widget) after another item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2010 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2011 * handle: Handle to the tree to be inserted.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2012 * item: Handle to the item to be positioned after.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2013 * title: The text title of the entry.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2014 * icon: Handle to coresponding icon.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2015 * parent: Parent handle or 0 if root.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2016 * itemdata: Item specific data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2017 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2018 HTREEITEM API dw_tree_insert_after(HWND handle, HTREEITEM item, char *title, unsigned long icon, HTREEITEM parent, void *itemdata)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2019 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2020 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2021 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2022
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2023 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2024 * Inserts an item into a tree window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2025 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2026 * handle: Handle to the tree to be inserted.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2027 * title: The text title of the entry.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2028 * icon: Handle to coresponding icon.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2029 * parent: Parent handle or 0 if root.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2030 * itemdata: Item specific data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2031 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2032 HTREEITEM API dw_tree_insert(HWND handle, char *title, unsigned long icon, HTREEITEM parent, void *itemdata)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2033 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2034 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2035 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2036
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2037 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2038 * Sets the text and icon of an item in a tree window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2039 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2040 * handle: Handle to the tree containing the item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2041 * item: Handle of the item to be modified.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2042 * title: The text title of the entry.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2043 * icon: Handle to coresponding icon.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2044 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
2045 void API dw_tree_item_change(HWND handle, HTREEITEM item, char *title, unsigned long icon)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2046 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2047 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2048
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2049 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2050 * Sets the item data of a tree item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2051 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2052 * handle: Handle to the tree containing the item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2053 * item: Handle of the item to be modified.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2054 * itemdata: User defined data to be associated with item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2055 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
2056 void API dw_tree_item_change_data(HWND handle, HTREEITEM item, void *itemdata)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2057 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2058 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2059
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2060 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2061 * Gets the item data of a tree item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2062 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2063 * handle: Handle to the tree containing the item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2064 * item: Handle of the item to be modified.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2065 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
2066 void * API dw_tree_item_get_data(HWND handle, HTREEITEM item)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2067 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2068 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2069 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2070
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2071 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2072 * Sets this item as the active selection.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2073 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2074 * handle: Handle to the tree window (widget) to be selected.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2075 * item: Handle to the item to be selected.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2076 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2077 void API dw_tree_item_select(HWND handle, HTREEITEM item)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2078 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2079 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2080
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2081 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2082 * Removes all nodes from a tree.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2083 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2084 * handle: Handle to the window (widget) to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2085 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2086 void API dw_tree_clear(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2087 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2088 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2089
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2090 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2091 * Expands a node on a tree.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2092 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2093 * handle: Handle to the tree window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2094 * item: Handle to node to be expanded.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2095 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
2096 void API dw_tree_item_expand(HWND handle, HTREEITEM item)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2097 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2098 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2099
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2100 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2101 * Collapses a node on a tree.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2102 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2103 * handle: Handle to the tree window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2104 * item: Handle to node to be collapsed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2105 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
2106 void API dw_tree_item_collapse(HWND handle, HTREEITEM item)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2107 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2108 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2109
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2110 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2111 * Removes a node from a tree.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2112 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2113 * handle: Handle to the window (widget) to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2114 * item: Handle to node to be deleted.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2115 */
510
710f82598210 Change function names to be inline with Mark Hessling's Rexx/DW.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 508
diff changeset
2116 void API dw_tree_item_delete(HWND handle, HTREEITEM item)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2117 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2118 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2119
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2120 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2121 * Sets up the container columns.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2122 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2123 * handle: Handle to the container to be configured.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2124 * flags: An array of unsigned longs with column flags.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2125 * titles: An array of strings with column text titles.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2126 * count: The number of columns (this should match the arrays).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2127 * separator: The column number that contains the main separator.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2128 * (this item may only be used in OS/2)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2129 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2130 int API dw_container_setup(HWND handle, unsigned long *flags, char **titles, int count, int separator)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2131 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2132 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2133 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2134
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2135 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2136 * Sets up the filesystem columns, note: filesystem always has an icon/filename field.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2137 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2138 * handle: Handle to the container to be configured.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2139 * flags: An array of unsigned longs with column flags.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2140 * titles: An array of strings with column text titles.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2141 * count: The number of columns (this should match the arrays).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2142 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2143 int API dw_filesystem_setup(HWND handle, unsigned long *flags, char **titles, int count)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2144 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2145 char **newtitles = malloc(sizeof(char *) * (count + 2));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2146 unsigned long *newflags = malloc(sizeof(unsigned long) * (count + 2));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2147
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2148 newtitles[0] = "Icon";
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2149 newtitles[1] = "Filename";
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2150
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2151 newflags[0] = DW_CFA_BITMAPORICON | DW_CFA_CENTER | DW_CFA_HORZSEPARATOR | DW_CFA_SEPARATOR;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2152 newflags[1] = DW_CFA_STRING | DW_CFA_LEFT | DW_CFA_HORZSEPARATOR;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2153
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2154 memcpy(&newtitles[2], titles, sizeof(char *) * count);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2155 memcpy(&newflags[2], flags, sizeof(unsigned long) * count);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2156
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2157 dw_container_setup(handle, newflags, newtitles, count + 2, count ? 2 : 0);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2158
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2159 free(newtitles);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2160 free(newflags);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2161 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2162 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2163
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2164 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2165 * Obtains an icon from a module (or header in GTK).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2166 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2167 * module: Handle to module (DLL) in OS/2 and Windows.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2168 * id: A unsigned long id int the resources on OS/2 and
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2169 * Windows, on GTK this is converted to a pointer
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2170 * to an embedded XPM.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2171 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2172 unsigned long API dw_icon_load(unsigned long module, unsigned long id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2173 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2174 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2175 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2176
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2177 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2178 * Obtains an icon from a file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2179 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2180 * filename: Name of the file, omit extention to have
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2181 * DW pick the appropriate file extension.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2182 * (ICO on OS/2 or Windows, XPM on Unix)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2183 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2184 unsigned long API dw_icon_load_from_file(char *filename)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2185 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2186 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2187 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2188
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2189 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2190 * Frees a loaded resource in OS/2 and Windows.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2191 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2192 * handle: Handle to icon returned by dw_icon_load().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2193 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2194 void API dw_icon_free(unsigned long handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2195 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2196 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2197
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2198 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2199 * Allocates memory used to populate a container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2200 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2201 * handle: Handle to the container window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2202 * rowcount: The number of items to be populated.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2203 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2204 void * API dw_container_alloc(HWND handle, int rowcount)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2205 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2206 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2207 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2208
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2209 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2210 * Sets an item in specified row and column to the given data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2211 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2212 * handle: Handle to the container window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2213 * pointer: Pointer to the allocated memory in dw_container_alloc().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2214 * column: Zero based column of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2215 * row: Zero based row of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2216 * data: Pointer to the data to be added.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2217 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2218 void API dw_container_set_item(HWND handle, void *pointer, int column, int row, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2219 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2220 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2221
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2222 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2223 * Changes an existing item in specified row and column to the given data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2224 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2225 * handle: Handle to the container window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2226 * column: Zero based column of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2227 * row: Zero based row of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2228 * data: Pointer to the data to be added.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2229 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2230 void API dw_container_change_item(HWND handle, int column, int row, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2231 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2232 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2233
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2234 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2235 * Sets an item in specified row and column to the given data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2236 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2237 * handle: Handle to the container window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2238 * pointer: Pointer to the allocated memory in dw_container_alloc().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2239 * column: Zero based column of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2240 * row: Zero based row of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2241 * data: Pointer to the data to be added.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2242 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2243 void API dw_filesystem_set_file(HWND handle, void *pointer, int row, char *filename, unsigned long icon)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2244 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2245 dw_container_set_item(handle, pointer, 0, row, (void *)&icon);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2246 dw_container_set_item(handle, pointer, 1, row, (void *)&filename);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2247 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2248
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2249 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2250 * Sets an item in specified row and column to the given data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2251 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2252 * handle: Handle to the container window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2253 * pointer: Pointer to the allocated memory in dw_container_alloc().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2254 * column: Zero based column of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2255 * row: Zero based row of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2256 * data: Pointer to the data to be added.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2257 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2258 void API dw_filesystem_set_item(HWND handle, void *pointer, int column, int row, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2259 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2260 dw_container_set_item(handle, pointer, column + 2, row, data);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2261 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2262
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2263 /*
508
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2264 * Gets column type for a container column
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2265 * Parameters:
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2266 * handle: Handle to the container window (widget).
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2267 * column: Zero based column.
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2268 */
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2269 int API dw_container_get_column_type(HWND handle, int column)
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2270 {
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2271 return 0;
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2272 }
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2273
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2274 /*
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2275 * Gets column type for a filesystem container column
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2276 * Parameters:
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2277 * handle: Handle to the container window (widget).
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2278 * column: Zero based column.
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2279 */
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2280 int API dw_filesystem_get_column_type(HWND handle, int column)
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2281 {
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2282 return dw_container_get_column_type( handle, column + 1 );
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2283 }
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2284
078a40ba2e41 Added dw_container_get_column_type and dw_filesystem_get_column_type.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 489
diff changeset
2285 /*
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2286 * Sets the width of a column in the container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2287 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2288 * handle: Handle to window (widget) of container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2289 * column: Zero based column of width being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2290 * width: Width of column in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2291 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2292 void API dw_container_set_column_width(HWND handle, int column, int width)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2293 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2294 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2295
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2296 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2297 * Sets the title of a row in the container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2298 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2299 * pointer: Pointer to the allocated memory in dw_container_alloc().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2300 * row: Zero based row of data being set.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2301 * title: String title of the item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2302 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2303 void API dw_container_set_row_title(void *pointer, int row, char *title)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2304 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2305 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2306
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2307 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2308 * Sets the title of a row in the container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2309 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2310 * handle: Handle to the container window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2311 * pointer: Pointer to the allocated memory in dw_container_alloc().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2312 * rowcount: The number of rows to be inserted.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2313 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2314 void API dw_container_insert(HWND handle, void *pointer, int rowcount)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2315 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2316 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2317
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2318 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2319 * Removes all rows from a container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2320 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2321 * handle: Handle to the window (widget) to be cleared.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2322 * redraw: TRUE to cause the container to redraw immediately.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2323 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2324 void API dw_container_clear(HWND handle, int redraw)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2325 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2326 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2327
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2328 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2329 * Removes the first x rows from a container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2330 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2331 * handle: Handle to the window (widget) to be deleted from.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2332 * rowcount: The number of rows to be deleted.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2333 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2334 void API dw_container_delete(HWND handle, int rowcount)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2335 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2336 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2337
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2338 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2339 * Scrolls container up or down.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2340 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2341 * handle: Handle to the window (widget) to be scrolled.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2342 * direction: DW_SCROLL_UP, DW_SCROLL_DOWN, DW_SCROLL_TOP or
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2343 * DW_SCROLL_BOTTOM. (rows is ignored for last two)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2344 * rows: The number of rows to be scrolled.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2345 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2346 void API dw_container_scroll(HWND handle, int direction, long rows)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2347 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2348 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2349
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2350 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2351 * Starts a new query of a container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2352 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2353 * handle: Handle to the window (widget) to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2354 * flags: If this parameter is DW_CRA_SELECTED it will only
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2355 * return items that are currently selected. Otherwise
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2356 * it will return all records in the container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2357 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2358 char * API dw_container_query_start(HWND handle, unsigned long flags)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2359 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2360 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2361 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2362
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2363 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2364 * Continues an existing query of a container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2365 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2366 * handle: Handle to the window (widget) to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2367 * flags: If this parameter is DW_CRA_SELECTED it will only
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2368 * return items that are currently selected. Otherwise
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2369 * it will return all records in the container.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2370 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2371 char * API dw_container_query_next(HWND handle, unsigned long flags)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2372 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2373 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2374 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2375
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2376 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2377 * Cursors the item with the text speficied, and scrolls to that item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2378 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2379 * handle: Handle to the window (widget) to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2380 * text: Text usually returned by dw_container_query().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2381 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2382 void API dw_container_cursor(HWND handle, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2383 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2384 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2385
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2386 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2387 * Deletes the item with the text speficied.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2388 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2389 * handle: Handle to the window (widget).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2390 * text: Text usually returned by dw_container_query().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2391 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2392 void API dw_container_delete_row(HWND handle, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2393 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2394 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2395
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2396 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2397 * Optimizes the column widths so that all data is visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2398 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2399 * handle: Handle to the window (widget) to be optimized.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2400 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2401 void API dw_container_optimize(HWND handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2402 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2403 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2404
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2405 /*
489
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2406 * Inserts an icon into the taskbar.
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2407 * Parameters:
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2408 * handle: Window handle that will handle taskbar icon messages.
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2409 * icon: Icon handle to display in the taskbar.
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2410 * bubbletext: Text to show when the mouse is above the icon.
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2411 */
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2412 void dw_taskbar_insert(HWND handle, unsigned long icon, char *bubbletext)
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2413 {
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2414 }
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2415
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2416 /*
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2417 * Deletes an icon from the taskbar.
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2418 * Parameters:
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2419 * handle: Window handle that was used with dw_taskbar_insert().
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2420 * icon: Icon handle that was used with dw_taskbar_insert().
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2421 */
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2422 void dw_taskbar_delete(HWND handle, unsigned long icon)
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2423 {
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2424 }
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2425
bc156294dd16 Fix compiler complaints on OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 445
diff changeset
2426 /*
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2427 * Creates a rendering context widget (window) to be packed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2428 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2429 * id: An id to be used with dw_window_from_id.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2430 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2431 * A handle to the widget or NULL on failure.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2432 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2433 HWND API dw_render_new(unsigned long id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2434 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2435 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2436 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2437
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2438 /* Sets the current foreground drawing color.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2439 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2440 * red: red value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2441 * green: green value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2442 * blue: blue value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2443 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2444 void API dw_color_foreground_set(unsigned long value)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2445 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2446 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2447
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2448 /* Sets the current background drawing color.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2449 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2450 * red: red value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2451 * green: green value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2452 * blue: blue value.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2453 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2454 void API dw_color_background_set(unsigned long value)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2455 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2456 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2457
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2458 /* Draw a point on a window (preferably a render window).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2459 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2460 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2461 * pixmap: Handle to the pixmap. (choose only one of these)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2462 * x: X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2463 * y: Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2464 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2465 void API dw_draw_point(HWND handle, HPIXMAP pixmap, int x, int y)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2466 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2467 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2468
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2469 /* Draw a line on a window (preferably a render window).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2470 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2471 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2472 * pixmap: Handle to the pixmap. (choose only one of these)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2473 * x1: First X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2474 * y1: First Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2475 * x2: Second X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2476 * y2: Second Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2477 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2478 void API dw_draw_line(HWND handle, HPIXMAP pixmap, int x1, int y1, int x2, int y2)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2479 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2480 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2481
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2482 /* Draw text on a window (preferably a render window).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2483 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2484 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2485 * pixmap: Handle to the pixmap. (choose only one of these)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2486 * x: X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2487 * y: Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2488 * text: Text to be displayed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2489 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2490 void API dw_draw_text(HWND handle, HPIXMAP pixmap, int x, int y, char *text)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2491 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2492 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2493
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2494 /* Query the width and height of a text string.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2495 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2496 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2497 * pixmap: Handle to the pixmap. (choose only one of these)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2498 * text: Text to be queried.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2499 * width: Pointer to a variable to be filled in with the width.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2500 * height Pointer to a variable to be filled in with the height.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2501 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2502 void API dw_font_text_extents(HWND handle, HPIXMAP pixmap, char *text, int *width, int *height)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2503 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2504 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2505
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2506 /* Draw a rectangle on a window (preferably a render window).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2507 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2508 * handle: Handle to the window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2509 * pixmap: Handle to the pixmap. (choose only one of these)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2510 * fill: Fill box TRUE or FALSE.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2511 * x: X coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2512 * y: Y coordinate.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2513 * width: Width of rectangle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2514 * height: Height of rectangle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2515 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2516 void API dw_draw_rect(HWND handle, HPIXMAP pixmap, int fill, int x, int y, int width, int height)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2517 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2518 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2519
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2520 /* Call this after drawing to the screen to make sure
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2521 * anything you have drawn is visible.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2522 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2523 void API dw_flush(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2524 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2525 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2526
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2527 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2528 * Creates a pixmap with given parameters.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2529 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2530 * handle: Window handle the pixmap is associated with.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2531 * width: Width of the pixmap in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2532 * height: Height of the pixmap in pixels.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2533 * depth: Color depth of the pixmap.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2534 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2535 * A handle to a pixmap or NULL on failure.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2536 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2537 HPIXMAP API dw_pixmap_new(HWND handle, unsigned long width, unsigned long height, int depth)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2538 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2539 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2540 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2541
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2542 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2543 * Creates a pixmap from a file.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2544 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2545 * handle: Window handle the pixmap is associated with.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2546 * filename: Name of the file, omit extention to have
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2547 * DW pick the appropriate file extension.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2548 * (BMP on OS/2 or Windows, XPM on Unix)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2549 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2550 * A handle to a pixmap or NULL on failure.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2551 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2552 HPIXMAP API dw_pixmap_new_from_file(HWND handle, char *filename)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2553 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2554 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2555 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2556
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2557 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2558 * Creates a pixmap from internal resource graphic specified by id.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2559 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2560 * handle: Window handle the pixmap is associated with.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2561 * id: Resource ID associated with requested pixmap.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2562 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2563 * A handle to a pixmap or NULL on failure.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2564 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2565 HPIXMAP API dw_pixmap_grab(HWND handle, ULONG id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2566 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2567 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2568 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2569
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2570 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2571 * Destroys an allocated pixmap.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2572 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2573 * pixmap: Handle to a pixmap returned by
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2574 * dw_pixmap_new..
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2575 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2576 void API dw_pixmap_destroy(HPIXMAP pixmap)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2577 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2578 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2579
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2580 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2581 * Copies from one item to another.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2582 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2583 * dest: Destination window handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2584 * destp: Destination pixmap. (choose only one).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2585 * xdest: X coordinate of destination.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2586 * ydest: Y coordinate of destination.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2587 * width: Width of area to copy.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2588 * height: Height of area to copy.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2589 * src: Source window handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2590 * srcp: Source pixmap. (choose only one).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2591 * xsrc: X coordinate of source.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2592 * ysrc: Y coordinate of source.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2593 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2594 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)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2595 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2596 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2597
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2598 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2599 * Emits a beep.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2600 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2601 * freq: Frequency.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2602 * dur: Duration.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2603 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2604 void API dw_beep(int freq, int dur)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2605 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2606 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2607
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2608 /* Open a shared library and return a handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2609 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2610 * name: Base name of the shared library.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2611 * handle: Pointer to a module handle,
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2612 * will be filled in with the handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2613 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2614 int API dw_module_load(char *name, HMOD *handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2615 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2616 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2617 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2618
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2619 /* Queries the address of a symbol within open handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2620 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2621 * handle: Module handle returned by dw_module_load()
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2622 * name: Name of the symbol you want the address of.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2623 * func: A pointer to a function pointer, to obtain
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2624 * the address.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2625 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2626 int API dw_module_symbol(HMOD handle, char *name, void**func)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2627 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2628 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2629 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2630
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2631 /* Frees the shared library previously opened.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2632 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2633 * handle: Module handle returned by dw_module_load()
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2634 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2635 int API dw_module_close(HMOD handle)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2636 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2637 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2638 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2639
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2640 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2641 * Returns the handle to an unnamed mutex semaphore.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2642 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2643 HMTX API dw_mutex_new(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2644 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2645 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2646 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2647
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2648 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2649 * Closes a semaphore created by dw_mutex_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2650 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2651 * mutex: The handle to the mutex returned by dw_mutex_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2652 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2653 void API dw_mutex_close(HMTX mutex)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2654 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2655 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2656
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2657 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2658 * Tries to gain access to the semaphore, if it can't it blocks.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2659 * If we are in a callback we must keep the message loop running
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2660 * while blocking.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2661 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2662 * mutex: The handle to the mutex returned by dw_mutex_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2663 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2664 void API dw_mutex_lock(HMTX mutex)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2665 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2666 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2667
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2668 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2669 * Reliquishes the access to the semaphore.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2670 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2671 * mutex: The handle to the mutex returned by dw_mutex_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2672 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2673 void API dw_mutex_unlock(HMTX mutex)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2674 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2675 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2676
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2677 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2678 * Returns the handle to an unnamed event semaphore.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2679 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2680 HEV API dw_event_new(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2681 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2682 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2683 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2684
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2685 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2686 * Resets a semaphore created by dw_event_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2687 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2688 * eve: The handle to the event returned by dw_event_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2689 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2690 int API dw_event_reset(HEV eve)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2691 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2692 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2693 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2694
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2695 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2696 * Posts a semaphore created by dw_event_new(). Causing all threads
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2697 * waiting on this event in dw_event_wait to continue.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2698 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2699 * eve: The handle to the event returned by dw_event_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2700 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2701 int API dw_event_post(HEV eve)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2702 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2703 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2704 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2705
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2706
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2707 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2708 * Waits on a semaphore created by dw_event_new(), until the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2709 * event gets posted or until the timeout expires.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2710 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2711 * eve: The handle to the event returned by dw_event_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2712 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2713 int API dw_event_wait(HEV eve, unsigned long timeout)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2714 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2715 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2716 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2717
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2718 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2719 * Closes a semaphore created by dw_event_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2720 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2721 * eve: The handle to the event returned by dw_event_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2722 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2723 int API dw_event_close(HEV *eve)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2724 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2725 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2726 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2727
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2728 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2729 * Creates a new thread with a starting point of func.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2730 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2731 * func: Function which will be run in the new thread.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2732 * data: Parameter(s) passed to the function.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2733 * stack: Stack size of new thread (OS/2 and Windows only).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2734 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2735 DWTID API dw_thread_new(void *func, void *data, int stack)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2736 {
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2737 return (DWTID)-1;
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2738 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2739
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2740 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2741 * Ends execution of current thread immediately.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2742 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2743 void API dw_thread_end(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2744 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2745 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2746
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2747 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2748 * Returns the current thread's ID.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2749 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2750 DWTID API dw_thread_id(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2751 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2752 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2753 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2754
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2755 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2756 * Cleanly terminates a DW session, should be signal handler safe.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2757 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2758 * exitcode: Exit code reported to the operating system.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2759 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2760 void API dw_exit(int exitcode)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2761 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2762 exit(exitcode);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2763 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2764
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2765 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2766 * Creates a splitbar window (widget) with given parameters.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2767 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2768 * type: Value can be DW_VERT or DW_HORZ.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2769 * topleft: Handle to the window to be top or left.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2770 * bottomright: Handle to the window to be bottom or right.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2771 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2772 * A handle to a splitbar window or NULL on failure.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2773 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2774 HWND API dw_splitbar_new(int type, HWND topleft, HWND bottomright, unsigned long id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2775 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2776 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2777 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2778
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2779 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2780 * Sets the position of a splitbar (pecentage).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2781 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2782 * handle: The handle to the splitbar returned by dw_splitbar_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2783 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2784 void API dw_splitbar_set(HWND handle, float percent)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2785 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2786 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2787
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2788 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2789 * Gets the position of a splitbar (pecentage).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2790 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2791 * handle: The handle to the splitbar returned by dw_splitbar_new().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2792 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2793 float API dw_splitbar_get(HWND handle)
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
2794 {
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2795 return 0.0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2796 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2797
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2798 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2799 * Pack windows (widgets) into a box from the start (or top).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2800 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2801 * box: Window handle of the box to be packed into.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2802 * item: Window handle of the item to be back.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2803 * width: Width in pixels of the item or -1 to be self determined.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2804 * height: Height in pixels of the item or -1 to be self determined.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2805 * hsize: TRUE if the window (widget) should expand horizontally to fill space given.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2806 * vsize: TRUE if the window (widget) should expand vertically to fill space given.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2807 * pad: Number of pixels of padding around the item.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2808 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2809 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2810 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2811 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2812
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2813 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2814 * Sets the default focus item for a window/dialog.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2815 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2816 * window: Toplevel window or dialog.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2817 * defaultitem: Handle to the dialog item to be default.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2818 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2819 void API dw_window_default(HWND window, HWND defaultitem)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2820 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2821 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2822
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2823 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2824 * Sets window to click the default dialog item when an ENTER is pressed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2825 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2826 * window: Window (widget) to look for the ENTER press.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2827 * next: Window (widget) to move to next (or click)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2828 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2829 void API dw_window_click_default(HWND window, HWND next)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2830 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2831 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2832
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2833 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2834 * Returns some information about the current operating environment.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2835 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2836 * env: Pointer to a DWEnv struct.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2837 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2838 void API dw_environment_query(DWEnv *env)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2839 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2840 ULONG Build;
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2841 char verbuf[10];
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2842
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2843 if(!env)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2844 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2845
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2846 Gestalt(gestaltSystemVersion, &Build);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2847
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2848 sprintf(verbuf, "%04x", (int)Build);
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2849
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2850 strcpy(env->osName,"MacOS");
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
2851 env->MajorBuild = atoi(&verbuf[3]);
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2852 verbuf[3] = 0;
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
2853 env->MinorVersion = atoi(&verbuf[2]);
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2854 verbuf[2] = 0;
437
903fb3085d42 More MacOS fixes, make install now works properly. Made special test
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 433
diff changeset
2855 env->MajorVersion = atoi(verbuf);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2856
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2857 env->MinorBuild = 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2858
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2859 strcpy(env->buildDate, __DATE__);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2860 strcpy(env->buildTime, __TIME__);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2861 env->DWMajorVersion = DW_MAJOR_VERSION;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2862 env->DWMinorVersion = DW_MINOR_VERSION;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2863 env->DWSubVersion = DW_SUB_VERSION;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2864 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2865
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2866 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2867 * Opens a file dialog and queries user selection.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2868 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2869 * title: Title bar text for dialog.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2870 * defpath: The default path of the open dialog.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2871 * ext: Default file extention.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2872 * flags: DW_FILE_OPEN or DW_FILE_SAVE.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2873 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2874 * NULL on error. A malloced buffer containing
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2875 * the file path on success.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2876 *
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2877 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2878 char * API dw_file_browse(char *title, char *defpath, char *ext, int flags)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2879 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2880 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2881 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2882
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2883 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2884 * Execute and external program in a seperate session.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2885 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2886 * program: Program name with optional path.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2887 * type: Either DW_EXEC_CON or DW_EXEC_GUI.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2888 * params: An array of pointers to string arguements.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2889 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2890 * -1 on error.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2891 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2892 int API dw_exec(char *program, int type, char **params)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2893 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2894 return -1;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2895 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2896
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2897 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2898 * Loads a web browser pointed at the given URL.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2899 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2900 * url: Uniform resource locator.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2901 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2902 int API dw_browse(char *url)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2903 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2904 return -1;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2905 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2906
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2907 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2908 * Returns a pointer to a static buffer which containes the
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2909 * current user directory. Or the root directory (C:\ on
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2910 * OS/2 and Windows).
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2911 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2912 char * API dw_user_dir(void)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2913 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2914 static char _user_dir[1024] = "";
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2915
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2916 if(!_user_dir[0])
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2917 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2918 char *home = getenv("HOME");
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2919
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2920 if(home)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2921 strcpy(_user_dir, home);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2922 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2923 strcpy(_user_dir, "/");
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2924 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2925 return _user_dir;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2926 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2927
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2928 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2929 * Call a function from the window (widget)'s context.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2930 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2931 * handle: Window handle of the widget.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2932 * function: Function pointer to be called.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2933 * data: Pointer to the data to be passed to the function.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2934 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2935 void API dw_window_function(HWND handle, void *function, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2936 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2937 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2938
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2939 /* Functions for managing the user data lists that are associated with
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2940 * a given window handle. Used in dw_window_set_data() and
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2941 * dw_window_get_data().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2942 */
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2943 static UserData *_find_userdata(UserData **root, char *varname)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2944 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2945 UserData *tmp = *root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2946
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2947 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2948 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
2949 if(strcasecmp(tmp->varname, varname) == 0)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2950 return tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2951 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2952 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2953 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2954 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2955
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2956 static int _new_userdata(UserData **root, char *varname, void *data)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2957 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2958 UserData *new = _find_userdata(root, varname);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2959
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2960 if(new)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2961 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2962 new->data = data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2963 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2964 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2965 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2966 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2967 new = malloc(sizeof(UserData));
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2968 if(new)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2969 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2970 new->varname = strdup(varname);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2971 new->data = data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2972
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2973 new->next = NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2974
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2975 if (!*root)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2976 *root = new;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2977 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2978 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2979 UserData *prev = NULL, *tmp = *root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2980 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2981 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2982 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2983 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2984 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2985 if(prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2986 prev->next = new;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2987 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2988 *root = new;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2989 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2990 return TRUE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2991 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2992 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2993 return FALSE;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2994 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2995
445
d9a5f98a1127 Reformatted source code, I am now using FTE on MacOS X. Implemented
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 443
diff changeset
2996 static int _remove_userdata(UserData **root, char *varname, int all)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2997 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2998 UserData *prev = NULL, *tmp = *root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2999
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3000 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3001 {
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
3002 if(all || strcasecmp(tmp->varname, varname) == 0)
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3003 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3004 if(!prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3005 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3006 *root = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3007 free(tmp->varname);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3008 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3009 if(!all)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3010 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3011 tmp = *root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3012 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3013 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3014 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3015 /* If all is true we should
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3016 * never get here.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3017 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3018 prev->next = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3019 free(tmp->varname);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3020 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3021 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3022 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3023 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3024 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3025 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3026 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3027 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3028 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3029 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3030 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3031 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3032
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3033 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3034 * Add a named user data item to a window handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3035 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3036 * window: Window handle of signal to be called back.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3037 * dataname: A string pointer identifying which signal to be hooked.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3038 * data: User data to be passed to the handler function.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3039 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3040 void API dw_window_set_data(HWND window, char *dataname, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3041 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3042 WindowData *blah = (WindowData *)_get_window_pointer(window);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3043
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3044 if(!blah)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3045 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3046 if(!dataname)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3047 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3048
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3049 blah = calloc(1, sizeof(WindowData));
433
f225f16bebbd Compile fixes for MacOS X.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 425
diff changeset
3050 _set_window_pointer(window, blah);
387
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3051 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3052
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3053 if(data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3054 _new_userdata(&(blah->root), dataname, data);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3055 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3056 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3057 if(dataname)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3058 _remove_userdata(&(blah->root), dataname, FALSE);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3059 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3060 _remove_userdata(&(blah->root), NULL, TRUE);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3061 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3062 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3063
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3064 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3065 * Gets a named user data item to a window handle.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3066 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3067 * window: Window handle of signal to be called back.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3068 * dataname: A string pointer identifying which signal to be hooked.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3069 * data: User data to be passed to the handler function.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3070 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3071 void *dw_window_get_data(HWND window, char *dataname)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3072 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3073 WindowData *blah = (WindowData *)_get_window_pointer(window);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3074
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3075 if(blah && blah->root && dataname)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3076 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3077 UserData *ud = _find_userdata(&(blah->root), dataname);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3078 if(ud)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3079 return ud->data;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3080 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3081 return NULL;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3082 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3083
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3084 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3085 * Add a callback to a timer event.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3086 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3087 * interval: Milliseconds to delay between calls.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3088 * sigfunc: The pointer to the function to be used as the callback.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3089 * data: User data to be passed to the handler function.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3090 * Returns:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3091 * Timer ID for use with dw_timer_disconnect(), 0 on error.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3092 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3093 int API dw_timer_connect(int interval, void *sigfunc, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3094 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3095 return 0;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3096 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3097
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3098 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3099 * Removes timer callback.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3100 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3101 * id: Timer ID returned by dw_timer_connect().
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3102 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3103 void API dw_timer_disconnect(int id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3104 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3105 SignalHandler *prev = NULL, *tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3106
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3107 /* 0 is an invalid timer ID */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3108 if(!id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3109 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3110
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3111 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3112 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3113 if(tmp->id == id)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3114 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3115 if(prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3116 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3117 prev->next = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3118 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3119 tmp = prev->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3120 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3121 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3122 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3123 Root = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3124 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3125 tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3126 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3127 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3128 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3129 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3130 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3131 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3132 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3133 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3134 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3135
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3136 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3137 * Add a callback to a window event.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3138 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3139 * window: Window handle of signal to be called back.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3140 * signame: A string pointer identifying which signal to be hooked.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3141 * sigfunc: The pointer to the function to be used as the callback.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3142 * data: User data to be passed to the handler function.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3143 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3144 void API dw_signal_connect(HWND window, char *signame, void *sigfunc, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3145 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3146 ULONG message = 0L;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3147
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3148 if(window && signame && sigfunc)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3149 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3150 if((message = _findsigmessage(signame)) != 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3151 _new_signal(message, window, 0, sigfunc, data);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3152 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3153 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3154
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3155 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3156 * Removes callbacks for a given window with given name.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3157 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3158 * window: Window handle of callback to be removed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3159 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3160 void API dw_signal_disconnect_by_name(HWND window, char *signame)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3161 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3162 SignalHandler *prev = NULL, *tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3163 ULONG message;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3164
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3165 if(!window || !signame || (message = _findsigmessage(signame)) == 0)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3166 return;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3167
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3168 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3169 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3170 if(tmp->window == window && tmp->message == message)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3171 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3172 if(prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3173 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3174 prev->next = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3175 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3176 tmp = prev->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3177 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3178 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3179 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3180 Root = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3181 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3182 tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3183 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3184 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3185 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3186 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3187 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3188 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3189 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3190 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3191 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3192
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3193 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3194 * Removes all callbacks for a given window.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3195 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3196 * window: Window handle of callback to be removed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3197 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3198 void API dw_signal_disconnect_by_window(HWND window)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3199 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3200 SignalHandler *prev = NULL, *tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3201
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3202 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3203 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3204 if(tmp->window == window)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3205 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3206 if(prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3207 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3208 prev->next = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3209 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3210 tmp = prev->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3211 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3212 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3213 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3214 Root = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3215 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3216 tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3217 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3218 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3219 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3220 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3221 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3222 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3223 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3224 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3225 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3226
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3227 /*
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3228 * Removes all callbacks for a given window with specified data.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3229 * Parameters:
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3230 * window: Window handle of callback to be removed.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3231 * data: Pointer to the data to be compared against.
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3232 */
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3233 void API dw_signal_disconnect_by_data(HWND window, void *data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3234 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3235 SignalHandler *prev = NULL, *tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3236
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3237 while(tmp)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3238 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3239 if(tmp->window == window && tmp->data == data)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3240 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3241 if(prev)
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3242 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3243 prev->next = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3244 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3245 tmp = prev->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3246 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3247 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3248 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3249 Root = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3250 free(tmp);
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3251 tmp = Root;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3252 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3253 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3254 else
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3255 {
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3256 prev = tmp;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3257 tmp = tmp->next;
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3258 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3259 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3260 }
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3261
456c13a6e332 A basically empty DW source file, if we ever port to another platform
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3262