fbkernel/fbkernel.h Source File

fbkernel.h
Go to the documentation of this file.
1 #ifndef __FBKERNEL_H__
2 #define __FBKERNEL_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2006 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
45 
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <fbsdk/fbcomponent.h>
52 #include <fbsdk/fbrenderer.h>
53 
54 #ifdef FBSDKUseNamespace
55  namespace FBSDKNamespace {
56 #endif
57 
58 __FB_FORWARD( FBKernel );
59 
60 #if defined(KARCH_ENV_WIN32)
61  typedef struct TOpaqueInstance* TInstance;
62 #elif defined(KARCH_ENV_MACOSX)
63  typedef struct TOpaqueWindowRef* TWindowRef;
64 #endif
65 
69 class FBSDK_DLL FBKernel : public FBComponent
70 {
71  __FBClassDeclare( FBKernel, FBComponent );
72  public:
74  FBKernel();
75 
80  virtual bool Init (const char *pLibraryDirectory);
81 
85  bool InitOpenGL();
86 
90  virtual bool Close ();
91 
92 #if defined(FB_KERNEL) && !defined(K_NO_UI)
93  void InitKernelUI();
94 #endif
95 
101  virtual bool OnDeviceKeyboardInput( FBDeviceKeyboardKey pKey, bool pState );
102 
108  #if defined(KARCH_ENV_WIN32)
109 
114  bool HookKeyboard(bool pActive, TInstance pModuleHandle);
115  #elif defined(KARCH_ENV_MACOSX)
116 
121  bool HookKeyboard(bool pActive, TWindowRef pWindowRef);
122 
129  void HandleRawKeyboard( int pHardwareKey, int pModifier, bool pKeyDown );
130  #endif
131 
135  static FBKernel& TheOne();
136 };
137 
138 #ifdef FBSDKUseNamespace
139  }
140 #endif
141 
142 #endif /* this must be the last line of this file */
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBDeviceKeyboardKey
Keyboard keys (for input).
Definition: fbrenderer.h:134
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbkernel.h:48
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Basic class definitions.
Rendering engine.