-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathofxDialog.h
More file actions
76 lines (57 loc) · 2.28 KB
/
ofxDialog.h
File metadata and controls
76 lines (57 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef _ofxDialog_h_
#define _ofxDialog_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#include "ofxCore.h"
#include "ofxProperty.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxDialog.h
This file contains an optional suite which should be used to popup a native OS dialog
from a host parameter changed action.
When a host uses a fullscreen window and is running the OFX plugins in another thread
it can lead to a lot of conflicts if that plugin will try to open its own window.
This suite will provide the functionality for a plugin to request running its dialog
in the UI thread, and informing the host it will do this so it can take the appropriate
actions needed. (Like lowering its priority etc..)
*/
/** @brief The name of the Dialog suite, used to fetch from a host via
OfxHost::fetchSuite
*/
#define kOfxDialogSuite "OfxDialogSuite"
/** @brief Action called after a dialog has requested a 'Dialog'
The arguments to the action are:
\arg \c user_data Pointer which was provided when the plugin requested the Dialog
When the plugin receives this action it is safe to popup a dialog.
It runs in the host's UI thread, which may differ from the main OFX processing thread.
Plugin should return from this action when all Dialog interactions are done.
At that point the host will continue again.
The host will not send any other messages asynchronous to this one.
*/
#define kOfxActionDialog "OfxActionDialog"
typedef struct OfxDialogSuiteV1
{
/** @brief Request the host to send a kOfxActionDialog to the plugin from its UI thread.
\pre
- user_data: A pointer to any user data
\post
@returns
- ::kOfxStatOK - The host has queued the request and will send an 'OfxActionDialog'
- ::kOfxStatFailed - The host has no provisio for this or can not deal with it currently.
*/
OfxStatus (*RequestDialog)( void *user_data );
/** @brief Inform the host of redraw event so it can redraw itself
If the host runs fullscreen in OpenGL, it would otherwise not receive
redraw event when a dialog in front would catch all events.
\pre
\post
@returns
- ::kOfxStatReplyDefault
*/
OfxStatus (*NotifyRedrawPending)( void );
} OfxDialogSuiteV1;
#ifdef __cplusplus
}
#endif
#endif