Pierre d'Herbemont pdherbemont@free.fr writes:
+static inline void * BindCarbonFunctions(void)
+{
+#define LOAD_FUNCTION(f) \
+#undef LOAD_FUNCTION
- return HIToolBoxDLHandle;
+}
This stuff should go in a C file, not in a header. Also you should use
ERR instead of fprintf, and error messages should be in English <g>
+struct quartzdrv_thread_data
+{
- int process_event_count; /* recursion count for event processing */
+};
+extern struct quartzdrv_thread_data *quartzdrv_init_thread_data(void);
+extern DWORD thread_data_tls_index;
+inline static struct quartzdrv_thread_data *quartzdrv_thread_data(void)
+{
- struct quartzdrv_thread_data *data = TlsGetValue( thread_data_tls_index );
- if (!data) data = quartzdrv_init_thread_data();
- return data;
+}
This is not used, it would be better to wait until you actually need
per-thread data to add it.
+/* ---------------------------------------------------------------------
+*/
+extern void wine_quartzdrv_lock(void);
+extern void wine_quartzdrv_unlock(void);
Do you really need locking around Carbon calls, or is this just
imitating x11drv? (either way there's no reason to export those).
+/* ---------------------------------------------------------------------
- get_quartzdrv_win_data_from_hwnd
- */
+struct quartzdrv_win_data *get_quartzdrv_win_data_from_hwnd(HWND hwnd)
+{
- return (struct quartzdrv_win_data *)GetPropA(hwnd, wine_quartzdrv_win_data);
+}
GetProp is not the best choice for associating data to a window as it
requires a server round trip. A process-local mechanism is preferable.
--
Alexandre Julliard
julliard@winehq.org