comparison template/dw.c @ 2226:2de088fb5dd4

Added some missing APIs from the template, and changes so it builds dwtest. Needed to make the key codes unique values so it would compile.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 26 Dec 2020 05:24:00 +0000
parents 1ec6300a627b
children d9e1865fcba9
comparison
equal deleted inserted replaced
2225:1ec6300a627b 2226:2de088fb5dd4
12 #include "dw.h" 12 #include "dw.h"
13 #include <stdlib.h> 13 #include <stdlib.h>
14 #include <string.h> 14 #include <string.h>
15 15
16 /* Implement these to get and set the Box* pointer on the widget handle */ 16 /* Implement these to get and set the Box* pointer on the widget handle */
17 void *_dw_get_window_pointer(HWND handle) 17 void *_dw_window_pointer_get(HWND handle)
18 { 18 {
19 return NULL; 19 return NULL;
20 } 20 }
21 21
22 void _dw_set_window_pointer(HWND handle, Box *box) 22 void _dw_window_pointer_set(HWND handle, Box *box)
23 { 23 {
24 } 24 }
25 25
26 /* This function calculates how much space the widgets and boxes require 26 /* This function calculates how much space the widgets and boxes require
27 * and does expansion as necessary. 27 * and does expansion as necessary.
75 { 75 {
76 int itempad, itemwidth, itemheight; 76 int itempad, itemwidth, itemheight;
77 77
78 if(thisbox->items[z].type == TYPEBOX) 78 if(thisbox->items[z].type == TYPEBOX)
79 { 79 {
80 Box *tmp = (Box *)_dw_get_window_pointer(thisbox->items[z].hwnd); 80 Box *tmp = (Box *)_dw_window_pointer_get(thisbox->items[z].hwnd);
81 81
82 if(tmp) 82 if(tmp)
83 { 83 {
84 /* On the first pass calculate the box contents */ 84 /* On the first pass calculate the box contents */
85 if(pass == 1) 85 if(pass == 1)
250 void API dw_main(void) 250 void API dw_main(void)
251 { 251 {
252 } 252 }
253 253
254 /* 254 /*
255 * Causes running dw_main() to return.
256 */
257 void API dw_main_quit(void)
258 {
259 }
260
261 /*
255 * Runs a message loop for Dynamic Windows, for a period of milliseconds. 262 * Runs a message loop for Dynamic Windows, for a period of milliseconds.
256 * Parameters: 263 * Parameters:
257 * milliseconds: Number of milliseconds to run the loop for. 264 * milliseconds: Number of milliseconds to run the loop for.
258 */ 265 */
259 void API dw_main_sleep(int milliseconds) 266 void API dw_main_sleep(int milliseconds)
404 * None. 411 * None.
405 * Returns: 412 * Returns:
406 * Pointer to an allocated string of text or NULL if clipboard empty or contents could not 413 * Pointer to an allocated string of text or NULL if clipboard empty or contents could not
407 * be converted to text. 414 * be converted to text.
408 */ 415 */
409 char *dw_clipboard_get_text() 416 char * API dw_clipboard_get_text()
410 { 417 {
411 return NULL; 418 return NULL;
412 } 419 }
413 420
414 /* 421 /*
415 * Sets the contents of the default clipboard to the supplied text. 422 * Sets the contents of the default clipboard to the supplied text.
416 * Parameters: 423 * Parameters:
417 * str: Text to put on the clipboard. 424 * str: Text to put on the clipboard.
418 * len: Length of the text. 425 * len: Length of the text.
419 */ 426 */
420 void dw_clipboard_set_text(const char *str, int len) 427 void API dw_clipboard_set_text(const char *str, int len)
421 { 428 {
422 } 429 }
423 430
424 431
425 /* 432 /*
561 { 568 {
562 Box *thisbox; 569 Box *thisbox;
563 int z, x = 0; 570 int z, x = 0;
564 Item *tmpitem, *thisitem; 571 Item *tmpitem, *thisitem;
565 572
566 thisbox = _dw_get_window_pointer(box); 573 thisbox = _dw_window_pointer_get(box);
567 thisitem = thisbox->items; 574 thisitem = thisbox->items;
568 575
569 /* Do some sanity bounds checking */ 576 /* Do some sanity bounds checking */
570 if(index < 0) 577 if(index < 0)
571 index = 0; 578 index = 0;
1767 void API dw_filesystem_set_item(HWND handle, void *pointer, int column, int row, void *data) 1774 void API dw_filesystem_set_item(HWND handle, void *pointer, int column, int row, void *data)
1768 { 1775 {
1769 } 1776 }
1770 1777
1771 /* 1778 /*
1779 * Sets the data of a row in the container.
1780 * Parameters:
1781 * pointer: Pointer to the allocated memory in dw_container_alloc().
1782 * row: Zero based row of data being set.
1783 * data: Data pointer.
1784 */
1785 void API dw_container_set_row_data(void *pointer, int row, void *data)
1786 {
1787 }
1788
1789 /*
1790 * Changes the data of a row already inserted in the container.
1791 * Parameters:
1792 * handle: Handle to the container window (widget).
1793 * row: Zero based row of data being set.
1794 * data: Data pointer.
1795 */
1796 void API dw_container_change_row_data(HWND handle, int row, void *data)
1797 {
1798 }
1799
1800 /*
1772 * Gets column type for a container column. 1801 * Gets column type for a container column.
1773 * Parameters: 1802 * Parameters:
1774 * handle: Handle to the container window (widget). 1803 * handle: Handle to the container window (widget).
1775 * column: Zero based column. 1804 * column: Zero based column.
1776 * Returns: 1805 * Returns:
2189 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) 2218 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)
2190 { 2219 {
2191 } 2220 }
2192 2221
2193 /* 2222 /*
2223 * Copies from one surface to another allowing for stretching.
2224 * Parameters:
2225 * dest: Destination window handle.
2226 * destp: Destination pixmap. (choose only one).
2227 * xdest: X coordinate of destination.
2228 * ydest: Y coordinate of destination.
2229 * width: Width of the target area.
2230 * height: Height of the target area.
2231 * src: Source window handle.
2232 * srcp: Source pixmap. (choose only one).
2233 * xsrc: X coordinate of source.
2234 * ysrc: Y coordinate of source.
2235 * srcwidth: Width of area to copy.
2236 * srcheight: Height of area to copy.
2237 * Returns:
2238 * DW_ERROR_NONE on success and DW_ERROR_GENERAL on failure.
2239 */
2240 int API dw_pixmap_stretch_bitblt(HWND dest, HPIXMAP destp, int xdest, int ydest, int width, int height, HWND src, HPIXMAP srcp, int xsrc, int ysrc, int srcwidth, int srcheight)
2241 {
2242 return DW_ERROR_GENERAL;
2243 }
2244
2245 /*
2194 * Create a new calendar window (widget) to be packed. 2246 * Create a new calendar window (widget) to be packed.
2195 * Parameters: 2247 * Parameters:
2196 * id: An ID to be used with dw_window_from_id() or 0L. 2248 * id: An ID to be used with dw_window_from_id() or 0L.
2197 * Returns: 2249 * Returns:
2198 * Handle to the created calendar or NULL on error. 2250 * Handle to the created calendar or NULL on error.
2206 * Sets the current date of a calendar. 2258 * Sets the current date of a calendar.
2207 * Parameters: 2259 * Parameters:
2208 * handle: The handle to the calendar returned by dw_calendar_new(). 2260 * handle: The handle to the calendar returned by dw_calendar_new().
2209 * year, month, day: To set the calendar to display. 2261 * year, month, day: To set the calendar to display.
2210 */ 2262 */
2211 void dw_calendar_set_date(HWND handle, unsigned int year, unsigned int month, unsigned int day) 2263 void API dw_calendar_set_date(HWND handle, unsigned int year, unsigned int month, unsigned int day)
2212 { 2264 {
2213 } 2265 }
2214 2266
2215 /* 2267 /*
2216 * Gets the year, month and day set in the calendar widget. 2268 * Gets the year, month and day set in the calendar widget.
2218 * handle: The handle to the calendar returned by dw_calendar_new(). 2270 * handle: The handle to the calendar returned by dw_calendar_new().
2219 * year: Variable to store the year or NULL. 2271 * year: Variable to store the year or NULL.
2220 * month: Variable to store the month or NULL. 2272 * month: Variable to store the month or NULL.
2221 * day: Variable to store the day or NULL. 2273 * day: Variable to store the day or NULL.
2222 */ 2274 */
2223 void dw_calendar_get_date(HWND handle, unsigned int *year, unsigned int *month, unsigned int *day) 2275 void API dw_calendar_get_date(HWND handle, unsigned int *year, unsigned int *month, unsigned int *day)
2224 { 2276 {
2225 } 2277 }
2226 2278
2227 /* 2279 /*
2228 * Causes the embedded HTML widget to take action. 2280 * Causes the embedded HTML widget to take action.
2270 * scriptdata: Data passed to the signal handler. 2322 * scriptdata: Data passed to the signal handler.
2271 * Notes: A DW_SIGNAL_HTML_RESULT event will be raised with scriptdata. 2323 * Notes: A DW_SIGNAL_HTML_RESULT event will be raised with scriptdata.
2272 * Returns: 2324 * Returns:
2273 * DW_ERROR_NONE (0) on success. 2325 * DW_ERROR_NONE (0) on success.
2274 */ 2326 */
2275 int dw_html_javascript_run(HWND handle, const char *script, void *scriptdata) 2327 int API dw_html_javascript_run(HWND handle, const char *script, void *scriptdata)
2276 { 2328 {
2277 return DW_ERROR_UNKNOWN; 2329 return DW_ERROR_UNKNOWN;
2278 } 2330 }
2279 2331
2280 /* 2332 /*
2957 /* 3009 /*
2958 * Returns some information about the current operating environment. 3010 * Returns some information about the current operating environment.
2959 * Parameters: 3011 * Parameters:
2960 * env: Pointer to a DWEnv struct. 3012 * env: Pointer to a DWEnv struct.
2961 */ 3013 */
2962 void dw_environment_query(DWEnv *env) 3014 void API dw_environment_query(DWEnv *env)
2963 { 3015 {
2964 strcpy(env->osName, "Unknown"); 3016 strcpy(env->osName, "Unknown");
2965 3017
2966 strcpy(env->buildDate, __DATE__); 3018 strcpy(env->buildDate, __DATE__);
2967 strcpy(env->buildTime, __TIME__); 3019 strcpy(env->buildTime, __TIME__);
2997 * Parameters: 3049 * Parameters:
2998 * window: Window handle to save data to. 3050 * window: Window handle to save data to.
2999 * dataname: A string pointer identifying which data to be saved. 3051 * dataname: A string pointer identifying which data to be saved.
3000 * data: User data to be saved to the window handle. 3052 * data: User data to be saved to the window handle.
3001 */ 3053 */
3002 void dw_window_set_data(HWND window, const char *dataname, void *data) 3054 void API dw_window_set_data(HWND window, const char *dataname, void *data)
3003 { 3055 {
3004 } 3056 }
3005 3057
3006 /* 3058 /*
3007 * Gets a named user data item from a window handle. 3059 * Gets a named user data item from a window handle.
3009 * window: Window handle to get data from. 3061 * window: Window handle to get data from.
3010 * dataname: A string pointer identifying which data to get. 3062 * dataname: A string pointer identifying which data to get.
3011 * Returns: 3063 * Returns:
3012 * Pointer to data or NULL if no data is available. 3064 * Pointer to data or NULL if no data is available.
3013 */ 3065 */
3014 void *dw_window_get_data(HWND window, const char *dataname) 3066 void * API dw_window_get_data(HWND window, const char *dataname)
3015 { 3067 {
3016 return NULL; 3068 return NULL;
3017 } 3069 }
3018 3070
3019 /* 3071 /*
3086 * handle: Pointer to a module handle, 3138 * handle: Pointer to a module handle,
3087 * will be filled in with the handle. 3139 * will be filled in with the handle.
3088 * Returns: 3140 * Returns:
3089 * DW_ERROR_NONE (0) on success. 3141 * DW_ERROR_NONE (0) on success.
3090 */ 3142 */
3091 int dw_module_load(const char *name, HMOD *handle) 3143 int API dw_module_load(const char *name, HMOD *handle)
3092 { 3144 {
3093 return DW_ERROR_UNKNOWN; 3145 return DW_ERROR_UNKNOWN;
3094 } 3146 }
3095 3147
3096 /* Queries the address of a symbol within open handle. 3148 /* Queries the address of a symbol within open handle.
3100 * func: A pointer to a function pointer, to obtain 3152 * func: A pointer to a function pointer, to obtain
3101 * the address. 3153 * the address.
3102 * Returns: 3154 * Returns:
3103 * DW_ERROR_NONE (0) on success. 3155 * DW_ERROR_NONE (0) on success.
3104 */ 3156 */
3105 int dw_module_symbol(HMOD handle, const char *name, void**func) 3157 int API dw_module_symbol(HMOD handle, const char *name, void**func)
3106 { 3158 {
3107 return DW_ERROR_UNKNOWN; 3159 return DW_ERROR_UNKNOWN;
3108 } 3160 }
3109 3161
3110 /* Frees the shared library previously opened. 3162 /* Frees the shared library previously opened.
3111 * Parameters: 3163 * Parameters:
3112 * handle: Module handle returned by dw_module_load() 3164 * handle: Module handle returned by dw_module_load()
3113 * Returns: 3165 * Returns:
3114 * DW_ERROR_NONE (0) on success. 3166 * DW_ERROR_NONE (0) on success.
3115 */ 3167 */
3116 int dw_module_close(HMOD handle) 3168 int API dw_module_close(HMOD handle)
3117 { 3169 {
3118 return DW_ERROR_GENERAL; 3170 return DW_ERROR_GENERAL;
3119 } 3171 }
3120 3172
3121 /* 3173 /*
3122 * Returns the handle to an unnamed mutex semaphore or NULL on error. 3174 * Returns the handle to an unnamed mutex semaphore or NULL on error.
3123 */ 3175 */
3124 HMTX dw_mutex_new(void) 3176 HMTX API dw_mutex_new(void)
3125 { 3177 {
3126 return NULL; 3178 return NULL;
3127 } 3179 }
3128 3180
3129 /* 3181 /*
3130 * Closes a semaphore created by dw_mutex_new(). 3182 * Closes a semaphore created by dw_mutex_new().
3131 * Parameters: 3183 * Parameters:
3132 * mutex: The handle to the mutex returned by dw_mutex_new(). 3184 * mutex: The handle to the mutex returned by dw_mutex_new().
3133 */ 3185 */
3134 void dw_mutex_close(HMTX mutex) 3186 void API dw_mutex_close(HMTX mutex)
3135 { 3187 {
3136 } 3188 }
3137 3189
3138 /* 3190 /*
3139 * Tries to gain access to the semaphore, if it can't it blocks. 3191 * Tries to gain access to the semaphore, if it can't it blocks.
3140 * Parameters: 3192 * Parameters:
3141 * mutex: The handle to the mutex returned by dw_mutex_new(). 3193 * mutex: The handle to the mutex returned by dw_mutex_new().
3142 */ 3194 */
3143 void dw_mutex_lock(HMTX mutex) 3195 void API dw_mutex_lock(HMTX mutex)
3144 { 3196 {
3145 #if 0 3197 #if 0
3146 /* We need to handle locks from the main thread differently... 3198 /* We need to handle locks from the main thread differently...
3147 * since we can't stop message processing... otherwise we 3199 * since we can't stop message processing... otherwise we
3148 * will deadlock... so try to acquire the lock and continue 3200 * will deadlock... so try to acquire the lock and continue
3181 /* 3233 /*
3182 * Reliquishes the access to the semaphore. 3234 * Reliquishes the access to the semaphore.
3183 * Parameters: 3235 * Parameters:
3184 * mutex: The handle to the mutex returned by dw_mutex_new(). 3236 * mutex: The handle to the mutex returned by dw_mutex_new().
3185 */ 3237 */
3186 void dw_mutex_unlock(HMTX mutex) 3238 void API dw_mutex_unlock(HMTX mutex)
3187 { 3239 {
3188 } 3240 }
3189 3241
3190 /* 3242 /*
3191 * Returns the handle to an unnamed event semaphore or NULL on error. 3243 * Returns the handle to an unnamed event semaphore or NULL on error.
3192 */ 3244 */
3193 HEV dw_event_new(void) 3245 HEV API dw_event_new(void)
3194 { 3246 {
3195 return NULL; 3247 return NULL;
3196 } 3248 }
3197 3249
3198 /* 3250 /*
3200 * Parameters: 3252 * Parameters:
3201 * eve: The handle to the event returned by dw_event_new(). 3253 * eve: The handle to the event returned by dw_event_new().
3202 * Returns: 3254 * Returns:
3203 * DW_ERROR_NONE (0) on success. 3255 * DW_ERROR_NONE (0) on success.
3204 */ 3256 */
3205 int dw_event_reset (HEV eve) 3257 int API dw_event_reset (HEV eve)
3206 { 3258 {
3207 return DW_ERROR_GENERAL; 3259 return DW_ERROR_GENERAL;
3208 } 3260 }
3209 3261
3210 /* 3262 /*
3213 * Parameters: 3265 * Parameters:
3214 * eve: The handle to the event returned by dw_event_new(). 3266 * eve: The handle to the event returned by dw_event_new().
3215 * Returns: 3267 * Returns:
3216 * DW_ERROR_NONE (0) on success. 3268 * DW_ERROR_NONE (0) on success.
3217 */ 3269 */
3218 int dw_event_post (HEV eve) 3270 int API dw_event_post (HEV eve)
3219 { 3271 {
3220 return DW_ERROR_GENERAL; 3272 return DW_ERROR_GENERAL;
3221 } 3273 }
3222 3274
3223 /* 3275 /*
3230 * Returns: 3282 * Returns:
3231 * DW_ERROR_NONE (0) on success. 3283 * DW_ERROR_NONE (0) on success.
3232 * DW_ERROR_TIMEOUT (2) if the timeout has expired. 3284 * DW_ERROR_TIMEOUT (2) if the timeout has expired.
3233 * Other values on other error. 3285 * Other values on other error.
3234 */ 3286 */
3235 int dw_event_wait(HEV eve, unsigned long timeout) 3287 int API dw_event_wait(HEV eve, unsigned long timeout)
3236 { 3288 {
3237 return DW_ERROR_GENERAL; 3289 return DW_ERROR_GENERAL;
3238 } 3290 }
3239 3291
3240 /* 3292 /*
3242 * Parameters: 3294 * Parameters:
3243 * eve: The handle to the event returned by dw_event_new(). 3295 * eve: The handle to the event returned by dw_event_new().
3244 * Returns: 3296 * Returns:
3245 * DW_ERROR_NONE (0) on success. 3297 * DW_ERROR_NONE (0) on success.
3246 */ 3298 */
3247 int dw_event_close(HEV *eve) 3299 int API dw_event_close(HEV *eve)
3248 { 3300 {
3249 return DW_ERROR_GENERAL; 3301 return DW_ERROR_GENERAL;
3250 } 3302 }
3251 3303
3252 /* Create a named event semaphore which can be 3304 /* Create a named event semaphore which can be
3255 * name: Name given to semaphore which can be opened 3307 * name: Name given to semaphore which can be opened
3256 * by other processes. 3308 * by other processes.
3257 * Returns: 3309 * Returns:
3258 * Handle to event semaphore or NULL on error. 3310 * Handle to event semaphore or NULL on error.
3259 */ 3311 */
3260 HEV dw_named_event_new(const char *name) 3312 HEV API dw_named_event_new(const char *name)
3261 { 3313 {
3262 return NULL; 3314 return NULL;
3263 } 3315 }
3264 3316
3265 /* Open an already existing named event semaphore. 3317 /* Open an already existing named event semaphore.
3267 * name: Name given to semaphore which can be opened 3319 * name: Name given to semaphore which can be opened
3268 * by other processes. 3320 * by other processes.
3269 * Returns: 3321 * Returns:
3270 * Handle to event semaphore or NULL on error. 3322 * Handle to event semaphore or NULL on error.
3271 */ 3323 */
3272 HEV dw_named_event_get(const char *name) 3324 HEV API dw_named_event_get(const char *name)
3273 { 3325 {
3274 return NULL; 3326 return NULL;
3275 } 3327 }
3276 3328
3277 /* Resets the event semaphore so threads who call wait 3329 /* Resets the event semaphore so threads who call wait
3280 * eve: Handle to the semaphore obtained by 3332 * eve: Handle to the semaphore obtained by
3281 * an get or new call. 3333 * an get or new call.
3282 * Returns: 3334 * Returns:
3283 * DW_ERROR_NONE (0) on success. 3335 * DW_ERROR_NONE (0) on success.
3284 */ 3336 */
3285 int dw_named_event_reset(HEV eve) 3337 int API dw_named_event_reset(HEV eve)
3286 { 3338 {
3287 return DW_ERROR_GENERAL; 3339 return DW_ERROR_GENERAL;
3288 } 3340 }
3289 3341
3290 /* Sets the posted state of an event semaphore, any threads 3342 /* Sets the posted state of an event semaphore, any threads
3293 * eve: Handle to the semaphore obtained by 3345 * eve: Handle to the semaphore obtained by
3294 * an get or new call. 3346 * an get or new call.
3295 * Returns: 3347 * Returns:
3296 * DW_ERROR_NONE (0) on success. 3348 * DW_ERROR_NONE (0) on success.
3297 */ 3349 */
3298 int dw_named_event_post(HEV eve) 3350 int API dw_named_event_post(HEV eve)
3299 { 3351 {
3300 return DW_ERROR_GENERAL; 3352 return DW_ERROR_GENERAL;
3301 } 3353 }
3302 3354
3303 /* Waits on the specified semaphore until it becomes 3355 /* Waits on the specified semaphore until it becomes
3308 * timeout: Number of milliseconds before timing out 3360 * timeout: Number of milliseconds before timing out
3309 * or -1 if indefinite. 3361 * or -1 if indefinite.
3310 * Returns: 3362 * Returns:
3311 * DW_ERROR_NONE (0) on success. 3363 * DW_ERROR_NONE (0) on success.
3312 */ 3364 */
3313 int dw_named_event_wait(HEV eve, unsigned long timeout) 3365 int API dw_named_event_wait(HEV eve, unsigned long timeout)
3314 { 3366 {
3315 return DW_ERROR_UNKNOWN; 3367 return DW_ERROR_UNKNOWN;
3316 } 3368 }
3317 3369
3318 /* Release this semaphore, if there are no more open 3370 /* Release this semaphore, if there are no more open
3321 * eve: Handle to the semaphore obtained by 3373 * eve: Handle to the semaphore obtained by
3322 * an get or new call. 3374 * an get or new call.
3323 * Returns: 3375 * Returns:
3324 * DW_ERROR_NONE (0) on success. 3376 * DW_ERROR_NONE (0) on success.
3325 */ 3377 */
3326 int dw_named_event_close(HEV eve) 3378 int API dw_named_event_close(HEV eve)
3327 { 3379 {
3328 return DW_ERROR_UNKNOWN; 3380 return DW_ERROR_UNKNOWN;
3329 } 3381 }
3330 3382
3331 /* 3383 /*
3350 * size: Size in bytes of the shared memory region to allocate. 3402 * size: Size in bytes of the shared memory region to allocate.
3351 * name: A string pointer to a unique memory name. 3403 * name: A string pointer to a unique memory name.
3352 * Returns: 3404 * Returns:
3353 * Handle to shared memory or NULL on error. 3405 * Handle to shared memory or NULL on error.
3354 */ 3406 */
3355 HSHM dw_named_memory_new(void **dest, int size, const char *name) 3407 HSHM API dw_named_memory_new(void **dest, int size, const char *name)
3356 { 3408 {
3357 return NULL; 3409 return NULL;
3358 } 3410 }
3359 3411
3360 /* 3412 /*
3364 * size: Size in bytes of the shared memory region to requested. 3416 * size: Size in bytes of the shared memory region to requested.
3365 * name: A string pointer to a unique memory name. 3417 * name: A string pointer to a unique memory name.
3366 * Returns: 3418 * Returns:
3367 * Handle to shared memory or NULL on error. 3419 * Handle to shared memory or NULL on error.
3368 */ 3420 */
3369 HSHM dw_named_memory_get(void **dest, int size, const char *name) 3421 HSHM API dw_named_memory_get(void **dest, int size, const char *name)
3370 { 3422 {
3371 return NULL; 3423 return NULL;
3372 } 3424 }
3373 3425
3374 /* 3426 /*
3377 * handle: Handle obtained from dw_named_memory_new(). 3429 * handle: Handle obtained from dw_named_memory_new().
3378 * ptr: The memory address aquired with dw_named_memory_new(). 3430 * ptr: The memory address aquired with dw_named_memory_new().
3379 * Returns: 3431 * Returns:
3380 * DW_ERROR_NONE (0) on success or DW_ERROR_UNKNOWN (-1) on error. 3432 * DW_ERROR_NONE (0) on success or DW_ERROR_UNKNOWN (-1) on error.
3381 */ 3433 */
3382 int dw_named_memory_free(HSHM handle, void *ptr) 3434 int API dw_named_memory_free(HSHM handle, void *ptr)
3383 { 3435 {
3384 int rc = DW_ERROR_UNKNOWN; 3436 int rc = DW_ERROR_UNKNOWN;
3385 3437
3386 return rc; 3438 return rc;
3387 } 3439 }
3393 * data: Parameter(s) passed to the function. 3445 * data: Parameter(s) passed to the function.
3394 * stack: Stack size of new thread (OS/2 and Windows only). 3446 * stack: Stack size of new thread (OS/2 and Windows only).
3395 * Returns: 3447 * Returns:
3396 * Thread ID on success or DW_ERROR_UNKNOWN (-1) on error. 3448 * Thread ID on success or DW_ERROR_UNKNOWN (-1) on error.
3397 */ 3449 */
3398 DWTID dw_thread_new(void *func, void *data, int stack) 3450 DWTID API dw_thread_new(void *func, void *data, int stack)
3399 { 3451 {
3400 return (DWTID)DW_ERROR_UNKNOWN; 3452 return (DWTID)DW_ERROR_UNKNOWN;
3401 } 3453 }
3402 3454
3403 /* 3455 /*
3404 * Ends execution of current thread immediately. 3456 * Ends execution of current thread immediately.
3405 */ 3457 */
3406 void dw_thread_end(void) 3458 void API dw_thread_end(void)
3407 { 3459 {
3408 } 3460 }
3409 3461
3410 /* 3462 /*
3411 * Returns the current thread's ID. 3463 * Returns the current thread's ID.
3412 */ 3464 */
3413 DWTID dw_thread_id(void) 3465 DWTID API dw_thread_id(void)
3414 { 3466 {
3415 return (DWTID)0; 3467 return (DWTID)0;
3416 } 3468 }
3417 3469
3418 /* 3470 /*
3422 * type: Either DW_EXEC_CON or DW_EXEC_GUI. 3474 * type: Either DW_EXEC_CON or DW_EXEC_GUI.
3423 * params: An array of pointers to string arguements. 3475 * params: An array of pointers to string arguements.
3424 * Returns: 3476 * Returns:
3425 * Process ID on success or DW_ERROR_UNKNOWN (-1) on error. 3477 * Process ID on success or DW_ERROR_UNKNOWN (-1) on error.
3426 */ 3478 */
3427 int dw_exec(const char *program, int type, char **params) 3479 int API dw_exec(const char *program, int type, char **params)
3428 { 3480 {
3429 int ret = DW_ERROR_UNKNOWN; 3481 int ret = DW_ERROR_UNKNOWN;
3430 3482
3431 return ret; 3483 return ret;
3432 } 3484 }
3436 * Parameters: 3488 * Parameters:
3437 * url: Uniform resource locator. 3489 * url: Uniform resource locator.
3438 * Returns: 3490 * Returns:
3439 * DW_ERROR_UNKNOWN (-1) on error; DW_ERROR_NONE (0) or a positive Process ID on success. 3491 * DW_ERROR_UNKNOWN (-1) on error; DW_ERROR_NONE (0) or a positive Process ID on success.
3440 */ 3492 */
3441 int dw_browse(const char *url) 3493 int API dw_browse(const char *url)
3442 { 3494 {
3443 return DW_ERROR_UNKNOWN; 3495 return DW_ERROR_UNKNOWN;
3444 } 3496 }
3445 3497
3446 /* 3498 /*