Commit | Line | Data |
---|---|---|
7fd59977 | 1 | /*============================================================================*/ |
2 | /*==== Titre: Aspect_GraphicCallbackProc.hxx */ | |
3 | /*==== Role : The header file of primitive type "GraphicCallbackProc" from package */ | |
4 | /*==== "V3d" */ | |
5 | /*==== Implementation: This is a primitive type implemented with typedef */ | |
6 | /*============================================================================*/ | |
7 | ||
8 | #ifndef _Aspect_GraphicCallbackProc_HeaderFile | |
9 | #define _Aspect_GraphicCallbackProc_HeaderFile | |
10 | #include <Aspect_Display.hxx> | |
11 | #include <Aspect_Drawable.hxx> | |
12 | #include <Aspect_RenderingContext.hxx> | |
13 | ||
14 | #define OCC_REDRAW_WINDOW 1 | |
15 | #define OCC_REDRAW_WINDOWAREA 2 | |
16 | #define OCC_REDRAW_BITMAP 3 | |
17 | ||
b299a91c A |
18 | // The flags below provide additional information to define the moment when |
19 | // callback was invoked in redraw procedure. These flags are bitwise OR'ed | |
20 | // with the "reason" value of callback: | |
21 | // 1) OCC_PRE_REDRAW - callback was invoked before redrawing underlayer | |
22 | // ( at the beginning of redraw procedure ); | |
23 | // 2) OCC_PRE_OVERLAY - callback was invoked before redrawing overlayer; | |
24 | // Otherwise, if no flags added to the "reason" value, the callback was | |
25 | // invoked at the end of redraw ( after the overlayer is redrawn ) | |
26 | #define OCC_PRE_REDRAW 0x4000 | |
7fd59977 | 27 | #define OCC_PRE_OVERLAY 0x8000 |
28 | ||
b299a91c A |
29 | // mask for all additional callbacks that invoked in process of redrawing |
30 | #define OCC_REDRAW_ADDITIONAL_CALLBACKS ( OCC_PRE_REDRAW | OCC_PRE_OVERLAY ) | |
31 | ||
7fd59977 | 32 | typedef struct { |
33 | int reason; | |
34 | int wsID; | |
35 | int viewID; | |
36 | Aspect_Display display; | |
37 | Aspect_Drawable window; | |
38 | Aspect_RenderingContext gcontext; | |
39 | } Aspect_GraphicCallbackStruct; | |
40 | ||
41 | typedef int (*Aspect_GraphicCallbackProc)( | |
42 | Aspect_Drawable /* Window ID */, | |
43 | void* /* user data */, | |
44 | Aspect_GraphicCallbackStruct* /* call data */ | |
45 | ); | |
46 | ||
47 | #if defined(__cplusplus) || defined(c_plusplus) | |
48 | /*==== Definition de Type ====================================================*/ | |
49 | ||
50 | #include <Standard_Macro.hxx> | |
51 | class Handle(Standard_Type); | |
52 | const Handle(Standard_Type)& STANDARD_TYPE(Aspect_GraphicCallbackProc); | |
53 | ||
54 | /*============================================================================*/ | |
55 | #endif | |
56 | ||
57 | #endif /* _Aspect_GraphicCallbackProc_HeaderFile */ |