Mercurial > dwindows
comparison dw.h @ 2584:2acc7ba5dea0
Add HTIMER type and change dw_timer_() functions to use it.
On existing platforms, HTIMER will be int for now allowing API backward compatibility.
On new platforms, iOS and Android, these will be pointers to the timer objects.
This allows simplifying the code paths on those platforms. May change it on other
platforms such as Mac in a future major version.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 23 May 2021 21:39:25 +0000 |
parents | a36448beb7f7 |
children | d59d579dc6ec |
comparison
equal
deleted
inserted
replaced
2583:1d2f5c4eccc5 | 2584:2acc7ba5dea0 |
---|---|
356 | 356 |
357 #define TRUE 1 | 357 #define TRUE 1 |
358 #define FALSE 0 | 358 #define FALSE 0 |
359 | 359 |
360 typedef void *HWND; | 360 typedef void *HWND; |
361 #ifdef __IOS__ | |
362 typedef void *HTIMER | |
363 #define HTIMER_TYPEDEFED 1 | |
364 #endif | |
361 typedef void *HSHM; | 365 typedef void *HSHM; |
362 typedef unsigned long ULONG; | 366 typedef unsigned long ULONG; |
363 typedef long LONG; | 367 typedef long LONG; |
364 typedef unsigned short USHORT; | 368 typedef unsigned short USHORT; |
365 typedef short SHORT; | 369 typedef short SHORT; |
739 | 743 |
740 #define TRUE 1 | 744 #define TRUE 1 |
741 #define FALSE 0 | 745 #define FALSE 0 |
742 | 746 |
743 typedef jobject HWND; | 747 typedef jobject HWND; |
748 typedef jobject HTIMER; | |
749 #define HTIMER_TYPEDEFED 1 | |
744 | 750 |
745 typedef unsigned long ULONG; | 751 typedef unsigned long ULONG; |
746 typedef long LONG; | 752 typedef long LONG; |
747 typedef unsigned short USHORT; | 753 typedef unsigned short USHORT; |
748 typedef short SHORT; | 754 typedef short SHORT; |
1593 /* Define a few things missing on OS/2 and Windows */ | 1599 /* Define a few things missing on OS/2 and Windows */ |
1594 #if defined(__OS2__) || (defined(__WIN32__) && !defined(GDK_WINDOWING_WIN32)) || \ | 1600 #if defined(__OS2__) || (defined(__WIN32__) && !defined(GDK_WINDOWING_WIN32)) || \ |
1595 (defined(WINNT) && !defined(GDK_WINDOWING_WIN32)) || defined(__EMX__) | 1601 (defined(WINNT) && !defined(GDK_WINDOWING_WIN32)) || defined(__EMX__) |
1596 typedef unsigned long DWTID; | 1602 typedef unsigned long DWTID; |
1597 #define DW_DIR_SEPARATOR '\\' | 1603 #define DW_DIR_SEPARATOR '\\' |
1604 #endif | |
1605 | |
1606 #ifndef HTIMER_TYPEDEFED | |
1607 typedef int HTIMER; | |
1608 #define HTIMER_TYPEDEFED 1 | |
1598 #endif | 1609 #endif |
1599 | 1610 |
1600 /* Some dark mode constants for supported platforms */ | 1611 /* Some dark mode constants for supported platforms */ |
1601 #define DW_DARK_MODE_DISABLED 0 | 1612 #define DW_DARK_MODE_DISABLED 0 |
1602 #define DW_DARK_MODE_BASIC 1 | 1613 #define DW_DARK_MODE_BASIC 1 |
2126 void * API dw_window_get_data(HWND window, const char *dataname); | 2137 void * API dw_window_get_data(HWND window, const char *dataname); |
2127 int API dw_window_compare(HWND window1, HWND window2); | 2138 int API dw_window_compare(HWND window1, HWND window2); |
2128 int API dw_module_load(const char *name, HMOD *handle); | 2139 int API dw_module_load(const char *name, HMOD *handle); |
2129 int API dw_module_symbol(HMOD handle, const char *name, void**func); | 2140 int API dw_module_symbol(HMOD handle, const char *name, void**func); |
2130 int API dw_module_close(HMOD handle); | 2141 int API dw_module_close(HMOD handle); |
2131 int API dw_timer_connect(int interval, void *sigfunc, void *data); | 2142 HTIMER API dw_timer_connect(int interval, void *sigfunc, void *data); |
2132 void API dw_timer_disconnect(int id); | 2143 void API dw_timer_disconnect(HTIMER id); |
2133 void API dw_signal_connect(HWND window, const char *signame, void *sigfunc, void *data); | 2144 void API dw_signal_connect(HWND window, const char *signame, void *sigfunc, void *data); |
2134 void API dw_signal_connect_data(HWND window, const char *signame, void *sigfunc, void *discfunc, void *data); | 2145 void API dw_signal_connect_data(HWND window, const char *signame, void *sigfunc, void *discfunc, void *data); |
2135 void API dw_signal_disconnect_by_window(HWND window); | 2146 void API dw_signal_disconnect_by_window(HWND window); |
2136 void API dw_signal_disconnect_by_data(HWND window, void *data); | 2147 void API dw_signal_disconnect_by_data(HWND window, void *data); |
2137 void API dw_signal_disconnect_by_name(HWND window, const char *signame); | 2148 void API dw_signal_disconnect_by_name(HWND window, const char *signame); |