00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GRAPHICSWINDOWPROCCALLBACKDATA_H
00016 #define GRAPHICSWINDOWPROCCALLBACKDATA_H
00017
00018 #include "pandabase.h"
00019 #include "callbackData.h"
00020 #include "touchInfo.h"
00021
00022 class GraphicsWindow;
00023
00024
00025
00026
00027
00028
00029
00030 class EXPCL_PANDA_DISPLAY GraphicsWindowProcCallbackData : public CallbackData {
00031 public:
00032 INLINE GraphicsWindowProcCallbackData(GraphicsWindow* graphicsWindow);
00033
00034 INLINE GraphicsWindow* get_graphics_window() const;
00035
00036 #ifdef WIN32
00037 INLINE void set_hwnd(int hwnd);
00038 INLINE void set_msg(int msg);
00039 INLINE void set_wparam(int wparam);
00040 INLINE void set_lparam(int lparam);
00041 #endif
00042
00043 PUBLISHED:
00044 virtual void output(ostream &out) const;
00045
00046 #ifdef WIN32
00047 INLINE int get_hwnd() const;
00048 INLINE int get_msg() const;
00049 INLINE int get_wparam() const;
00050 INLINE int get_lparam() const;
00051 #endif
00052
00053 bool is_touch_event();
00054 int get_num_touches();
00055 TouchInfo get_touch_info(int index);
00056
00057 private:
00058 GraphicsWindow* _graphicsWindow;
00059 #ifdef WIN32
00060 int _hwnd;
00061 int _msg;
00062 int _wparam;
00063 int _lparam;
00064 #endif
00065
00066 public:
00067 static TypeHandle get_class_type() {
00068 return _type_handle;
00069 }
00070 static void init_type() {
00071 CallbackData::init_type();
00072 register_type(_type_handle, "GraphicsWindowProcCallbackData",
00073 CallbackData::get_class_type());
00074 }
00075 virtual TypeHandle get_type() const {
00076 return get_class_type();
00077 }
00078 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00079
00080 private:
00081 static TypeHandle _type_handle;
00082 };
00083
00084 #include "graphicsWindowProcCallbackData.I"
00085
00086 #endif // GRAPHICSWINDOWPROCCALLBACKDATA_H