comparison win/dw.c @ 2068:ade83a05a7d8

Added notification stubs for Windows and OS/2. Windows code is in progress, but having some build system integration issues. So I wanted to commit the stubs at least to ensure things still build in the meantime.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 14 May 2020 23:27:56 +0000
parents c1afe013b07c
children b4b49d29b940
comparison
equal deleted inserted replaced
2067:3ccd0da07514 2068:ade83a05a7d8
1 /* 1 /*
2 * Dynamic Windows: 2 * Dynamic Windows:
3 * A GTK like implementation of the Win32 GUI 3 * A GTK like implementation of the Win32 GUI
4 * 4 *
5 * (C) 2000-2019 Brian Smith <brian@dbsoft.org> 5 * (C) 2000-2020 Brian Smith <brian@dbsoft.org>
6 * (C) 2003-2011 Mark Hessling <mark@rexx.org> 6 * (C) 2003-2011 Mark Hessling <mark@rexx.org>
7 * 7 *
8 */ 8 */
9 9
10 #ifdef AEROGLASS 10 #ifdef AEROGLASS
276 * an alternate temporary directory if TMP is not set, so we get the value 276 * an alternate temporary directory if TMP is not set, so we get the value
277 * of TEMP and store it here. 277 * of TEMP and store it here.
278 */ 278 */
279 static char _dw_alternate_temp_dir[MAX_PATH+1] = {0}; 279 static char _dw_alternate_temp_dir[MAX_PATH+1] = {0};
280 static char _dw_exec_dir[MAX_PATH+1] = {0}; 280 static char _dw_exec_dir[MAX_PATH+1] = {0};
281 static char _dw_app_id[101]= {0};
281 282
282 int main(int argc, char *argv[]); 283 int main(int argc, char *argv[]);
283 284
284 #define ICON_INDEX_LIMIT 200 285 #define ICON_INDEX_LIMIT 200
285 HICON lookup[200]; 286 HICON lookup[200];
12342 CloseClipboard(); 12343 CloseClipboard();
12343 GlobalFree( ptr1 ); 12344 GlobalFree( ptr1 );
12344 } 12345 }
12345 12346
12346 /* 12347 /*
12348 * Creates a new system notification if possible.
12349 * Parameters:
12350 * title: The short title of the notification.
12351 * pixmap: Handle to an image to display or NULL if none.
12352 * description: A longer description of the notification,
12353 * or NULL if none is necessary.
12354 * Returns:
12355 * A handle to the notification which can be used to attach a "clicked" event if desired,
12356 * or NULL if it fails or notifications are not supported by the system.
12357 * Remarks:
12358 * This will create a system notification that will show in the notifaction panel
12359 * on supported systems, which may be clicked to perform another task.
12360 */
12361 HWND dw_notification_new(const char *title, HPIXMAP pixmap, const char *description, ...)
12362 {
12363 return NULL;
12364 }
12365
12366 /*
12367 * Sends a notification created by dw_notification_new() after attaching signal handler.
12368 * Parameters:
12369 * notification: The handle to the notification returned by dw_notification_new().
12370 * Returns:
12371 * DW_ERROR_NONE on success, DW_ERROR_UNKNOWN on error or not supported.
12372 */
12373 int dw_notification_send(HWND notification)
12374 {
12375 return DW_ERROR_UNKNOWN;
12376 }
12377
12378 /*
12347 * Returns some information about the current operating environment. 12379 * Returns some information about the current operating environment.
12348 * Parameters: 12380 * Parameters:
12349 * env: Pointer to a DWEnv struct. 12381 * env: Pointer to a DWEnv struct.
12350 */ 12382 */
12351 void API dw_environment_query(DWEnv *env) 12383 void API dw_environment_query(DWEnv *env)
12782 { 12814 {
12783 return _dw_exec_dir; 12815 return _dw_exec_dir;
12784 } 12816 }
12785 12817
12786 /* 12818 /*
12819 * Sets the application ID used by this Dynamic Windows application instance.
12820 * Parameters:
12821 * appid: A string typically in the form: com.company.division.application
12822 * Returns:
12823 * DW_ERROR_NONE after successfully setting the application ID.
12824 * DW_ERROR_UNKNOWN if unsupported on this system.
12825 * DW_ERROR_GENERAL if the application ID is not allowed.
12826 * Remarks:
12827 * This must be called before dw_init(). If dw_init() is called first
12828 * it will create a unique ID in the form: org.dbsoft.dwindows.application
12829 * or if the application name cannot be detected: org.dbsoft.dwindows.pid.#
12830 */
12831 int dw_app_id_set(const char *appid)
12832 {
12833 return DW_ERROR_UNKNOWN;
12834 }
12835
12836 /*
12787 * Call a function from the window (widget)'s context. 12837 * Call a function from the window (widget)'s context.
12788 * Parameters: 12838 * Parameters:
12789 * handle: Window handle of the widget. 12839 * handle: Window handle of the widget.
12790 * function: Function pointer to be called. 12840 * function: Function pointer to be called.
12791 * data: Pointer to the data to be passed to the function. 12841 * data: Pointer to the data to be passed to the function.