1 |
schoenebeck |
2474 |
/* |
2 |
schoenebeck |
3258 |
Copyright (c) 2013 - 2017 Christian Schoenebeck |
3 |
schoenebeck |
2474 |
|
4 |
|
|
This file is part of "gigedit" and released under the terms of the |
5 |
|
|
GNU General Public License version 2. |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
#ifndef GIGEDIT_MAC_HELPER |
9 |
|
|
#define GIGEDIT_MAC_HELPER |
10 |
|
|
|
11 |
|
|
#if defined(__cplusplus) |
12 |
|
|
extern "C" { |
13 |
|
|
#endif // __cplusplus |
14 |
|
|
|
15 |
|
|
/** |
16 |
|
|
* Run the given C callback function @a fn on the process's main thread. This |
17 |
|
|
* function will return immediately. The callback function will be scheduled |
18 |
|
|
* for asynchronous execution. In general this function will only succeed if |
19 |
|
|
* if there is a CoreFoundation event loop established and running in this |
20 |
|
|
* process, if not, the callback function will never be executed! |
21 |
|
|
* |
22 |
|
|
* @param fn - callback function to be executed on main thread |
23 |
|
|
* @param info - arbitrary pointer which will be passed to the callback call |
24 |
|
|
*/ |
25 |
|
|
void macHelperRunCFuncOnMainThread(void (*fn)(void* info), void* info); |
26 |
|
|
|
27 |
schoenebeck |
3258 |
/** |
28 |
|
|
* Calling this function ensures that the app windows really becomes visible |
29 |
|
|
* in front of all other windows if the window is raised. |
30 |
|
|
*/ |
31 |
|
|
void macRaiseAppWindow(); |
32 |
|
|
|
33 |
schoenebeck |
2474 |
#if defined(__cplusplus) |
34 |
|
|
} |
35 |
|
|
#endif // __cplusplus |
36 |
|
|
|
37 |
|
|
#endif // GIGEDIT_MAC_HELPER |