comparison mac/dw.c @ 433:f225f16bebbd

Compile fixes for MacOS X.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 27 May 2003 21:43:49 +0000
parents 4fe2df53ec9f
children 903fb3085d42
comparison
equal deleted inserted replaced
432:5f9f185e4aa0 433:f225f16bebbd
26 { 26 {
27 ULONG message; 27 ULONG message;
28 char name[30]; 28 char name[30];
29 29
30 } SignalList; 30 } SignalList;
31
32 const Rect CreationRect = { 0, 0, 2000, 1000 };
33 WindowRef CreationWindow = 0;
31 34
32 /* List of signals and their equivilent MacOS event */ 35 /* List of signals and their equivilent MacOS event */
33 #define SIGNALMAX 15 36 #define SIGNALMAX 15
34 37
35 SignalList SignalTranslate[SIGNALMAX] = { 38 SignalList SignalTranslate[SIGNALMAX] = {
39 { mouseUp, DW_SIGNAL_BUTTON_RELEASE }, 42 { mouseUp, DW_SIGNAL_BUTTON_RELEASE },
40 { nullEvent, DW_SIGNAL_MOTION_NOTIFY }, 43 { nullEvent, DW_SIGNAL_MOTION_NOTIFY },
41 { nullEvent, DW_SIGNAL_DELETE }, 44 { nullEvent, DW_SIGNAL_DELETE },
42 { updateEvt, DW_SIGNAL_EXPOSE }, 45 { updateEvt, DW_SIGNAL_EXPOSE },
43 { nullEvent, DW_SIGNAL_CLICKED }, 46 { nullEvent, DW_SIGNAL_CLICKED },
44 { nullEVent, DW_SIGNAL_ITEM_ENTER }, 47 { nullEvent, DW_SIGNAL_ITEM_ENTER },
45 { nullEvent, DW_SIGNAL_ITEM_CONTEXT }, 48 { nullEvent, DW_SIGNAL_ITEM_CONTEXT },
46 { nullEvent, DW_SIGNAL_LIST_SELECT }, 49 { nullEvent, DW_SIGNAL_LIST_SELECT },
47 { nullEVent, DW_SIGNAL_ITEM_SELECT }, 50 { nullEvent, DW_SIGNAL_ITEM_SELECT },
48 { activateEvt, DW_SIGNAL_SET_FOCUS }, 51 { activateEvt, DW_SIGNAL_SET_FOCUS },
49 { nullEvent, DW_SIGNAL_VALUE_CHANGED }, 52 { nullEvent, DW_SIGNAL_VALUE_CHANGED },
50 { nullEvent, DW_SIGNAL_SWITCH_PAGE } 53 { nullEvent, DW_SIGNAL_SWITCH_PAGE }
51 }; 54 };
52 55
93 { 96 {
94 int z; 97 int z;
95 98
96 for(z=0;z<SIGNALMAX;z++) 99 for(z=0;z<SIGNALMAX;z++)
97 { 100 {
98 if(stricmp(signame, SignalTranslate[z].name) == 0) 101 if(strcasecmp(signame, SignalTranslate[z].name) == 0)
99 return SignalTranslate[z].message; 102 return SignalTranslate[z].message;
100 } 103 }
101 return 0L; 104 return 0L;
102 } 105 }
103 106
104 void *_get_window_pointer(HWND handle) 107 void *_get_window_pointer(HWND handle)
108 {
109 return NULL;
110 }
111
112 void _set_window_pointer(HWND handle, void *pointer)
105 { 113 {
106 } 114 }
107 115
108 /* This function will recursively search a box and add up the total height of it */ 116 /* This function will recursively search a box and add up the total height of it */
109 void _count_size(HWND box, int type, int *xsize, int *xorigsize) 117 void _count_size(HWND box, int type, int *xsize, int *xorigsize)
529 537
530 for(z=0;z<thisbox->count;z++) 538 for(z=0;z<thisbox->count;z++)
531 { 539 {
532 if(thisbox->items[z].type == TYPEBOX) 540 if(thisbox->items[z].type == TYPEBOX)
533 { 541 {
534 Box *tmp = WinQueryWindowPtr(thisbox->items[z].hwnd, QWP_USER); 542 Box *tmp = _get_window_pointer(thisbox->items[z].hwnd);
535 _changebox(tmp, percent, type); 543 _changebox(tmp, percent, type);
536 } 544 }
537 else 545 else
538 { 546 {
539 if(type == DW_HORZ) 547 if(type == DW_HORZ)
830 * title: The Window title. 838 * title: The Window title.
831 * flStyle: Style flags, see the PM reference. 839 * flStyle: Style flags, see the PM reference.
832 */ 840 */
833 HWND API dw_window_new(HWND hwndOwner, char *title, ULONG flStyle) 841 HWND API dw_window_new(HWND hwndOwner, char *title, ULONG flStyle)
834 { 842 {
835 HWND hwnd = 0; 843 WindowRef hwnd = 0;
836 CreateNewWindow (kDocumentWindowClass, flStyle, 844 CreateNewWindow (kDocumentWindowClass, flStyle,
837 &contentRect, &theWindow); 845 &CreationRect, &hwnd);
838 return hwnd; 846 return (HWND)hwnd;
839 } 847 }
840 848
841 /* 849 /*
842 * Create a new Box to be packed. 850 * Create a new Box to be packed.
843 * Parameters: 851 * Parameters:
856 * pad: Number of pixels to pad around the box. 864 * pad: Number of pixels to pad around the box.
857 * title: Text to be displayined in the group outline. 865 * title: Text to be displayined in the group outline.
858 */ 866 */
859 HWND API dw_groupbox_new(int type, int pad, char *title) 867 HWND API dw_groupbox_new(int type, int pad, char *title)
860 { 868 {
861 OSStatus CreateRadioGroupControl ( 869 HWND hwnd = 0;
862 WindowRef window, 870 CreateRadioGroupControl(CreationWindow, &CreationRect, &hwnd);
863 const Rect * boundsRect, 871 return hwnd;
864 ControlRef * outControl
865 ); return 0;
866 } 872 }
867 873
868 /* 874 /*
869 * Create a new MDI Frame to be packed. 875 * Create a new MDI Frame to be packed.
870 * Parameters: 876 * Parameters:
880 * Parameters: 886 * Parameters:
881 * id: An ID to be used with dw_window_from_id() or 0L. 887 * id: An ID to be used with dw_window_from_id() or 0L.
882 */ 888 */
883 HWND API dw_bitmap_new(ULONG id) 889 HWND API dw_bitmap_new(ULONG id)
884 { 890 {
885 OSStatus CreateImageWellControl ( 891 HWND hwnd = 0;
886 WindowRef window, 892 CreateImageWellControl(CreationWindow, &CreationRect, NULL, &hwnd);
887 const Rect * boundsRect, 893 return hwnd;
888 const ControlButtonContentInfo * info,
889 ControlRef * outControl
890 ); return 0;
891 } 894 }
892 895
893 /* 896 /*
894 * Create a notebook object to be packed. 897 * Create a notebook object to be packed.
895 * Parameters: 898 * Parameters:
896 * id: An ID to be used for getting the resource from the 899 * id: An ID to be used for getting the resource from the
897 * resource file. 900 * resource file.
898 */ 901 */
899 HWND API dw_notebook_new(ULONG id, int top) 902 HWND API dw_notebook_new(ULONG id, int top)
900 { 903 {
901 OSStatus CreateTabsControl ( 904 HWND hwnd = 0;
902 WindowRef window, 905 CreateTabsControl(CreationWindow, &CreationRect, kControlTabSizeSmall, kControlTabDirectionNorth, 1, NULL, &hwnd);
903 const Rect * boundsRect, 906 return hwnd;
904 ControlTabSize size,
905 ControlTabDirection direction,
906 UInt16 numTabs,
907 const ControlTabEntry * tabArray,
908 ControlRef * outControl
909 ); return 0;
910 } 907 }
911 908
912 /* 909 /*
913 * Create a menu object to be popped up. 910 * Create a menu object to be popped up.
914 * Parameters: 911 * Parameters:
1005 * id: An ID to be used for getting the resource from the 1002 * id: An ID to be used for getting the resource from the
1006 * resource file. 1003 * resource file.
1007 */ 1004 */
1008 HWND API dw_container_new(ULONG id, int multi) 1005 HWND API dw_container_new(ULONG id, int multi)
1009 { 1006 {
1010 return 0; 1007 ListHandle hwnd = 0;
1008 Point CellSize;
1009 ListDefSpec def;
1010
1011 SetPt(&CellSize, 52, 52);
1012 /*def.u.userProc = listDefinitionFunctionUPP;*/
1013
1014 CreateCustomList(&CreationRect, &CreationRect, CellSize, &def, CreationWindow, TRUE, TRUE, TRUE, TRUE, &hwnd);
1015 return (HWND)hwnd;
1011 } 1016 }
1012 1017
1013 /* 1018 /*
1014 * Create a tree object to be packed. 1019 * Create a tree object to be packed.
1015 * Parameters: 1020 * Parameters:
1016 * id: An ID to be used for getting the resource from the 1021 * id: An ID to be used for getting the resource from the
1017 * resource file. 1022 * resource file.
1018 */ 1023 */
1019 HWND API dw_tree_new(ULONG id) 1024 HWND API dw_tree_new(ULONG id)
1020 { 1025 {
1021 return 0; 1026 return dw_container_new(id, FALSE);
1022 } 1027 }
1023 1028
1024 /* 1029 /*
1025 * Create a new static text window (widget) to be packed. 1030 * Create a new static text window (widget) to be packed.
1026 * Parameters: 1031 * Parameters:
1027 * text: The text to be display by the static text widget. 1032 * text: The text to be display by the static text widget.
1028 * id: An ID to be used with dw_window_from_id() or 0L. 1033 * id: An ID to be used with dw_window_from_id() or 0L.
1029 */ 1034 */
1030 HWND API dw_text_new(char *text, ULONG id) 1035 HWND API dw_text_new(char *text, ULONG id)
1031 { 1036 {
1032 OSStatus CreateStaticTextControl ( 1037 HWND hwnd = 0;
1033 WindowRef window, 1038 CreateStaticTextControl (CreationWindow, &CreationRect, text, NULL, &hwnd);
1034 const Rect * boundsRect, 1039 return hwnd;
1035 CFStringRef text,
1036 const ControlFontStyleRec * style,
1037 ControlRef * outControl
1038 ); return 0;
1039 } 1040 }
1040 1041
1041 /* 1042 /*
1042 * Create a new status text window (widget) to be packed. 1043 * Create a new status text window (widget) to be packed.
1043 * Parameters: 1044 * Parameters:
1044 * text: The text to be display by the static text widget. 1045 * text: The text to be display by the static text widget.
1045 * id: An ID to be used with dw_window_from_id() or 0L. 1046 * id: An ID to be used with dw_window_from_id() or 0L.
1046 */ 1047 */
1047 HWND API dw_status_text_new(char *text, ULONG id) 1048 HWND API dw_status_text_new(char *text, ULONG id)
1048 { 1049 {
1049 OSStatus CreateStaticTextControl ( 1050 HWND hwnd = 0;
1050 WindowRef window, 1051 CreateStaticTextControl (CreationWindow, &CreationRect, text, NULL, &hwnd);
1051 const Rect * boundsRect, 1052 return hwnd;
1052 CFStringRef text,
1053 const ControlFontStyleRec * style,
1054 ControlRef * outControl
1055 return 0;
1056 } 1053 }
1057 1054
1058 /* 1055 /*
1059 * Create a new Multiline Editbox window (widget) to be packed. 1056 * Create a new Multiline Editbox window (widget) to be packed.
1060 * Parameters: 1057 * Parameters:
1061 * id: An ID to be used with dw_window_from_id() or 0L. 1058 * id: An ID to be used with dw_window_from_id() or 0L.
1062 */ 1059 */
1063 HWND API dw_mle_new(ULONG id) 1060 HWND API dw_mle_new(ULONG id)
1064 { 1061 {
1065 OSStatus CreateScrollingTextBoxControl ( 1062 HWND hwnd = 0;
1066 WindowRef window, 1063 CreateScrollingTextBoxControl(CreationWindow, &CreationRect, id, FALSE, 0, 0, 0, &hwnd);
1067 const Rect * boundsRect, 1064 return hwnd;
1068 SInt16 contentResID,
1069 Boolean autoScroll,
1070 UInt32 delayBeforeAutoScroll,
1071 UInt32 delayBetweenAutoScroll,
1072 UInt16 autoScrollAmount,
1073 ControlRef * outControl
1074 );
1075 return 0;
1076 } 1065 }
1077 1066
1078 /* 1067 /*
1079 * Create a new Entryfield window (widget) to be packed. 1068 * Create a new Entryfield window (widget) to be packed.
1080 * Parameters: 1069 * Parameters:
1081 * text: The default text to be in the entryfield widget. 1070 * text: The default text to be in the entryfield widget.
1082 * id: An ID to be used with dw_window_from_id() or 0L. 1071 * id: An ID to be used with dw_window_from_id() or 0L.
1083 */ 1072 */
1084 HWND API dw_entryfield_new(char *text, ULONG id) 1073 HWND API dw_entryfield_new(char *text, ULONG id)
1085 { 1074 {
1086 OSStatus CreateEditTextControl ( 1075 HWND hwnd = 0;
1087 WindowRef window, 1076 CreateEditTextControl(CreationWindow, &CreationRect, text, FALSE, FALSE, NULL, &hwnd);
1088 const Rect * boundsRect, 1077 return hwnd;
1089 CFStringRef text,
1090 Boolean isPassword,
1091 Boolean useInlineInput,
1092 const ControlFontStyleRec * style,
1093 ControlRef * outControl
1094 ); return 0;
1095 } 1078 }
1096 1079
1097 /* 1080 /*
1098 * Create a new Entryfield (password) window (widget) to be packed. 1081 * Create a new Entryfield (password) window (widget) to be packed.
1099 * Parameters: 1082 * Parameters:
1100 * text: The default text to be in the entryfield widget. 1083 * text: The default text to be in the entryfield widget.
1101 * id: An ID to be used with dw_window_from_id() or 0L. 1084 * id: An ID to be used with dw_window_from_id() or 0L.
1102 */ 1085 */
1103 HWND API dw_entryfield_password_new(char *text, ULONG id) 1086 HWND API dw_entryfield_password_new(char *text, ULONG id)
1104 { 1087 {
1105 OSStatus CreateEditTextControl ( 1088 HWND hwnd = 0;
1106 WindowRef window, 1089 CreateEditTextControl(CreationWindow, &CreationRect, text, TRUE, FALSE, NULL, &hwnd);
1107 const Rect * boundsRect, 1090 return hwnd;
1108 CFStringRef text,
1109 Boolean isPassword,
1110 Boolean useInlineInput,
1111 const ControlFontStyleRec * style,
1112 ControlRef * outControl
1113 return 0;
1114 } 1091 }
1115 1092
1116 /* 1093 /*
1117 * Create a new Combobox window (widget) to be packed. 1094 * Create a new Combobox window (widget) to be packed.
1118 * Parameters: 1095 * Parameters:
1130 * text: The text to be display by the static text widget. 1107 * text: The text to be display by the static text widget.
1131 * id: An ID to be used with dw_window_from_id() or 0L. 1108 * id: An ID to be used with dw_window_from_id() or 0L.
1132 */ 1109 */
1133 HWND API dw_button_new(char *text, ULONG id) 1110 HWND API dw_button_new(char *text, ULONG id)
1134 { 1111 {
1135 OSStatus CreatePushButtonControl ( 1112 HWND hwnd = 0;
1136 WindowRef window, 1113 CreatePushButtonControl(CreationWindow, &CreationRect, text, &hwnd);
1137 const Rect * boundsRect, 1114 return hwnd;
1138 CFStringRef title,
1139 ControlRef * outControl
1140 ); return 0;
1141 } 1115 }
1142 1116
1143 /* 1117 /*
1144 * Create a new bitmap button window (widget) to be packed. 1118 * Create a new bitmap button window (widget) to be packed.
1145 * Parameters: 1119 * Parameters:
1146 * text: Bubble help text to be displayed. 1120 * text: Bubble help text to be displayed.
1147 * id: An ID of a bitmap in the resource file. 1121 * id: An ID of a bitmap in the resource file.
1148 */ 1122 */
1149 HWND API dw_bitmapbutton_new(char *text, ULONG id) 1123 HWND API dw_bitmapbutton_new(char *text, ULONG id)
1150 { 1124 {
1151 OSStatus CreatePushButtonWithIconControl ( 1125 HWND hwnd = 0;
1152 WindowRef window, 1126 CreatePushButtonWithIconControl(CreationWindow, &CreationRect, 0, NULL, kControlPushButtonIconOnLeft, &hwnd);
1153 const Rect * boundsRect, 1127 return hwnd;
1154 CFStringRef title,
1155 ControlButtonContentInfo * icon,
1156 ControlPushButtonIconAlignment iconAlignment,
1157 ControlRef * outControl
1158 ); return 0;
1159 } 1128 }
1160 1129
1161 /* 1130 /*
1162 * Create a new bitmap button window (widget) to be packed from a file. 1131 * Create a new bitmap button window (widget) to be packed from a file.
1163 * Parameters: 1132 * Parameters:
1189 * text: The text to be display by the static text widget. 1158 * text: The text to be display by the static text widget.
1190 * id: An ID to be used with dw_window_from_id() or 0L. 1159 * id: An ID to be used with dw_window_from_id() or 0L.
1191 */ 1160 */
1192 HWND API dw_radiobutton_new(char *text, ULONG id) 1161 HWND API dw_radiobutton_new(char *text, ULONG id)
1193 { 1162 {
1194 OSStatus CreateRadioButtonControl ( 1163 HWND hwnd = 0;
1195 WindowRef window, 1164 CreateRadioButtonControl(CreationWindow, &CreationRect, text, 0, FALSE, &hwnd);
1196 const Rect * boundsRect, 1165 return hwnd;
1197 CFStringRef title,
1198 SInt32 initialValue,
1199 Boolean autoToggle,
1200 ControlRef * outControl
1201 );
1202
1203
1204 return 0;
1205 } 1166 }
1206 1167
1207 1168
1208 /* 1169 /*
1209 * Create a new slider window (widget) to be packed. 1170 * Create a new slider window (widget) to be packed.
1212 * increments: Number of increments available. 1173 * increments: Number of increments available.
1213 * id: An ID to be used with dw_window_from_id() or 0L. 1174 * id: An ID to be used with dw_window_from_id() or 0L.
1214 */ 1175 */
1215 HWND API dw_slider_new(int vertical, int increments, ULONG id) 1176 HWND API dw_slider_new(int vertical, int increments, ULONG id)
1216 { 1177 {
1217 OSStatus CreateSliderControl ( 1178 HWND hwnd = 0;
1218 WindowRef window, 1179 CreateSliderControl(CreationWindow, &CreationRect, 0, 0, increments, kControlSliderDoesNotPoint, 0, FALSE, 0, &hwnd);
1219 const Rect * boundsRect, 1180 return hwnd;
1220 SInt32 value,
1221 SInt32 minimum,
1222 SInt32 maximum,
1223 ControlSliderOrientation orientation,
1224 UInt16 numTickMarks,
1225 Boolean liveTracking,
1226 ControlActionUPP liveTrackingProc,
1227 ControlRef * outControl
1228 ); return 0;
1229 } 1181 }
1230 1182
1231 /* 1183 /*
1232 * Create a new scrollbar window (widget) to be packed. 1184 * Create a new scrollbar window (widget) to be packed.
1233 * Parameters: 1185 * Parameters:
1235 * increments: Number of increments available. 1187 * increments: Number of increments available.
1236 * id: An ID to be used with dw_window_from_id() or 0L. 1188 * id: An ID to be used with dw_window_from_id() or 0L.
1237 */ 1189 */
1238 HWND API dw_scrollbar_new(int vertical, int increments, ULONG id) 1190 HWND API dw_scrollbar_new(int vertical, int increments, ULONG id)
1239 { 1191 {
1240 OSStatus CreateScrollBarControl ( 1192 HWND hwnd;
1241 WindowRef window, 1193 CreateScrollBarControl(CreationWindow, &CreationRect, 0, 0, increments, increments, FALSE, 0, &hwnd);
1242 const Rect * boundsRect, 1194 return hwnd;
1243 SInt32 value,
1244 SInt32 minimum,
1245 SInt32 maximum,
1246 SInt32 viewSize,
1247 Boolean liveTracking,
1248 ControlActionUPP liveTrackingProc,
1249 ControlRef * outControl
1250 ); return 0;
1251 } 1195 }
1252 1196
1253 /* 1197 /*
1254 * Create a new percent bar window (widget) to be packed. 1198 * Create a new percent bar window (widget) to be packed.
1255 * Parameters: 1199 * Parameters:
1256 * id: An ID to be used with dw_window_from_id() or 0L. 1200 * id: An ID to be used with dw_window_from_id() or 0L.
1257 */ 1201 */
1258 HWND API dw_percent_new(ULONG id) 1202 HWND API dw_percent_new(ULONG id)
1259 { 1203 {
1260 OSStatus CreateProgressBarControl ( 1204 HWND hwnd = 0;
1261 WindowRef window, 1205 CreateProgressBarControl(CreationWindow, &CreationRect, 0, 0, 100, FALSE, &hwnd);
1262 const Rect * boundsRect, 1206 return hwnd;
1263 SInt32 value,
1264 SInt32 minimum,
1265 SInt32 maximum,
1266 Boolean indeterminate,
1267 ControlRef * outControl
1268 ); return 0;
1269 } 1207 }
1270 1208
1271 /* 1209 /*
1272 * Create a new checkbox window (widget) to be packed. 1210 * Create a new checkbox window (widget) to be packed.
1273 * Parameters: 1211 * Parameters:
1274 * text: The text to be display by the static text widget. 1212 * text: The text to be display by the static text widget.
1275 * id: An ID to be used with dw_window_from_id() or 0L. 1213 * id: An ID to be used with dw_window_from_id() or 0L.
1276 */ 1214 */
1277 HWND API dw_checkbox_new(char *text, ULONG id) 1215 HWND API dw_checkbox_new(char *text, ULONG id)
1278 { 1216 {
1279 OSStatus CreateCheckBoxControl ( 1217 HWND hwnd = 0;
1280 WindowRef window, 1218 CreateCheckBoxControl(CreationWindow, &CreationRect, text, 0, TRUE, &hwnd);
1281 const Rect * boundsRect, 1219 return hwnd;
1282 CFStringRef title,
1283 SInt32 initialValue,
1284 Boolean autoToggle,
1285 ControlRef * outControl
1286 ); return 0;
1287 } 1220 }
1288 1221
1289 /* 1222 /*
1290 * Create a new listbox window (widget) to be packed. 1223 * Create a new listbox window (widget) to be packed.
1291 * Parameters: 1224 * Parameters:
1292 * id: An ID to be used with dw_window_from_id() or 0L. 1225 * id: An ID to be used with dw_window_from_id() or 0L.
1293 * multi: Multiple select TRUE or FALSE. 1226 * multi: Multiple select TRUE or FALSE.
1294 */ 1227 */
1295 HWND API dw_listbox_new(ULONG id, int multi) 1228 HWND API dw_listbox_new(ULONG id, int multi)
1296 { 1229 {
1297 OSStatus CreateListBoxControl ( 1230 HWND hwnd = 0;
1298 WindowRef window, 1231 CreateListBoxControl(CreationWindow, &CreationRect, TRUE, 0, 1, FALSE, TRUE, 50, 50, TRUE, NULL, &hwnd);
1299 const Rect * boundsRect, 1232 return hwnd;
1300 Boolean autoSize,
1301 SInt16 numRows,
1302 SInt16 numColumns,
1303 Boolean horizScroll,
1304 Boolean vertScroll,
1305 SInt16 cellHeight,
1306 SInt16 cellWidth,
1307 Boolean hasGrowSpace,
1308 const ListDefSpec * listDef,
1309 ControlRef * outControl
1310 ); return 0;
1311 } 1233 }
1312 1234
1313 /* 1235 /*
1314 * Sets the icon used for a given window. 1236 * Sets the icon used for a given window.
1315 * Parameters: 1237 * Parameters:
1383 * handle: Handle to the parent window. 1305 * handle: Handle to the parent window.
1384 * id: Integer ID of the child. 1306 * id: Integer ID of the child.
1385 */ 1307 */
1386 HWND API dw_window_from_id(HWND handle, int id) 1308 HWND API dw_window_from_id(HWND handle, int id)
1387 { 1309 {
1388 HWND ret; 1310 HWND ret = 0;
1389 1311
1312 #if 0
1390 ControlID cid = (ControlID)id; 1313 ControlID cid = (ControlID)id;
1391 GetControlByID(handle, &cid, &ret); 1314 GetControlByID((WindowRef)handle, &cid, &ret);
1315 #endif
1392 return ret; 1316 return ret;
1393 );
1394
1395
1396 return 0;
1397 } 1317 }
1398 1318
1399 /* 1319 /*
1400 * Pack windows (widgets) into a box from the end (or bottom). 1320 * Pack windows (widgets) into a box from the end (or bottom).
1401 * Parameters: 1321 * Parameters:
2615 * data: Parameter(s) passed to the function. 2535 * data: Parameter(s) passed to the function.
2616 * stack: Stack size of new thread (OS/2 and Windows only). 2536 * stack: Stack size of new thread (OS/2 and Windows only).
2617 */ 2537 */
2618 DWTID API dw_thread_new(void *func, void *data, int stack) 2538 DWTID API dw_thread_new(void *func, void *data, int stack)
2619 { 2539 {
2540 return (DWTID)-1;
2620 } 2541 }
2621 2542
2622 /* 2543 /*
2623 * Ends execution of current thread immediately. 2544 * Ends execution of current thread immediately.
2624 */ 2545 */
2671 * Gets the position of a splitbar (pecentage). 2592 * Gets the position of a splitbar (pecentage).
2672 * Parameters: 2593 * Parameters:
2673 * handle: The handle to the splitbar returned by dw_splitbar_new(). 2594 * handle: The handle to the splitbar returned by dw_splitbar_new().
2674 */ 2595 */
2675 float API dw_splitbar_get(HWND handle) 2596 float API dw_splitbar_get(HWND handle)
2597 {
2676 return 0.0; 2598 return 0.0;
2677 } 2599 }
2678 2600
2679 /* 2601 /*
2680 * Pack windows (widgets) into a box from the start (or top). 2602 * Pack windows (widgets) into a box from the start (or top).
2818 { 2740 {
2819 UserData *tmp = *root; 2741 UserData *tmp = *root;
2820 2742
2821 while(tmp) 2743 while(tmp)
2822 { 2744 {
2823 if(stricmp(tmp->varname, varname) == 0) 2745 if(strcasecmp(tmp->varname, varname) == 0)
2824 return tmp; 2746 return tmp;
2825 tmp = tmp->next; 2747 tmp = tmp->next;
2826 } 2748 }
2827 return NULL; 2749 return NULL;
2828 } 2750 }
2871 { 2793 {
2872 UserData *prev = NULL, *tmp = *root; 2794 UserData *prev = NULL, *tmp = *root;
2873 2795
2874 while(tmp) 2796 while(tmp)
2875 { 2797 {
2876 if(all || stricmp(tmp->varname, varname) == 0) 2798 if(all || strcasecmp(tmp->varname, varname) == 0)
2877 { 2799 {
2878 if(!prev) 2800 if(!prev)
2879 { 2801 {
2880 *root = tmp->next; 2802 *root = tmp->next;
2881 free(tmp->varname); 2803 free(tmp->varname);
2919 { 2841 {
2920 if(!dataname) 2842 if(!dataname)
2921 return; 2843 return;
2922 2844
2923 blah = calloc(1, sizeof(WindowData)); 2845 blah = calloc(1, sizeof(WindowData));
2924 SetWindowProperty(window, QWP_USER, blah); 2846 _set_window_pointer(window, blah);
2925 } 2847 }
2926 2848
2927 if(data) 2849 if(data)
2928 _new_userdata(&(blah->root), dataname, data); 2850 _new_userdata(&(blah->root), dataname, data);
2929 else 2851 else