David Rose 16 роки тому
батько
коміт
2b5d5fb9e6

+ 1 - 0
panda/src/display/nativeWindowHandle.cxx

@@ -14,6 +14,7 @@
 
 #include "nativeWindowHandle.h"
 
+TypeHandle NativeWindowHandle::_type_handle;
 TypeHandle NativeWindowHandle::IntHandle::_type_handle;
 TypeHandle NativeWindowHandle::SubprocessHandle::_type_handle;
 

+ 13 - 0
panda/src/display/nativeWindowHandle.h

@@ -180,7 +180,14 @@ public:
 #endif  // WIN32
 
 public:
+  static TypeHandle get_class_type() {
+    return _type_handle;
+  }
   static void init_type() {
+    WindowHandle::init_type();
+    register_type(_type_handle, "NativeWindowHandle",
+                  WindowHandle::get_class_type());
+
     IntHandle::init_type();
     SubprocessHandle::init_type();
 #if defined(HAVE_X11) && !defined(CPPPARSER)
@@ -190,7 +197,13 @@ public:
     WinHandle::init_type();
 #endif
   }
+  virtual TypeHandle get_type() const {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
+private:
+  static TypeHandle _type_handle;
 };
 
 #include "nativeWindowHandle.I"