Panda3D
|
00001 // Filename: winGraphicsPipe.h 00002 // Created by: drose (20Dec02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef WINGRAPHICSPIPE_H 00016 #define WINGRAPHICSPIPE_H 00017 00018 #include "pandabase.h" 00019 #include "graphicsPipe.h" 00020 #include "winGraphicsWindow.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : WinGraphicsPipe 00024 // Description : This is an abstract base class for wglGraphicsPipe 00025 // and wdxGraphicsPipe; that is, those graphics pipes 00026 // that are specialized for working with Microsoft 00027 // Windows. 00028 // 00029 // There isn't much code here, since most of the fancy 00030 // stuff is handled in WinGraphicsWindow. You could 00031 // make a case that we don't even need a WinGraphicsPipe 00032 // class at all, but it is provided mainly for 00033 // completeness. 00034 //////////////////////////////////////////////////////////////////// 00035 class EXPCL_PANDAWIN WinGraphicsPipe : public GraphicsPipe { 00036 public: 00037 WinGraphicsPipe(); 00038 virtual ~WinGraphicsPipe(); 00039 00040 virtual void lookup_cpu_data(); 00041 00042 private: 00043 HINSTANCE _hUser32; 00044 typedef BOOL (WINAPI *PFN_TRACKMOUSEEVENT)(LPTRACKMOUSEEVENT); 00045 PFN_TRACKMOUSEEVENT _pfnTrackMouseEvent; 00046 00047 public: 00048 static TypeHandle get_class_type() { 00049 return _type_handle; 00050 } 00051 static void init_type() { 00052 GraphicsPipe::init_type(); 00053 register_type(_type_handle, "WinGraphicsPipe", 00054 GraphicsPipe::get_class_type()); 00055 } 00056 virtual TypeHandle get_type() const { 00057 return get_class_type(); 00058 } 00059 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00060 00061 private: 00062 static TypeHandle _type_handle; 00063 00064 friend class WinGraphicsWindow; 00065 }; 00066 00067 extern EXPCL_PANDAWIN bool MyLoadLib(HINSTANCE &hDLL, const char *DLLname); 00068 extern EXPCL_PANDAWIN bool MyGetProcAddr(HINSTANCE hDLL, FARPROC *pFn, const char *szExportedFnName); 00069 00070 #include "winGraphicsPipe.I" 00071 00072 #endif