/[pcsx2_0.9.7]/trunk/common/include/Utilities/pxEvents.h
ViewVC logotype

Diff of /trunk/common/include/Utilities/pxEvents.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 61 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 75  class pxSimpleEvent : public wxEvent Line 75  class pxSimpleEvent : public wxEvent
75          DECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxSimpleEvent)          DECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxSimpleEvent)
76    
77  public:  public:
78          pxSimpleEvent( int evtid=0 )          explicit pxSimpleEvent( int evtid=0 )
79                  : wxEvent(0, evtid)                  : wxEvent(0, evtid)
80          { }          { }
81    
# Line 87  public: Line 87  public:
87  };  };
88    
89  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
90  //  pxInvokeActionEvent  //  pxActionEvent
91  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
92  class pxInvokeActionEvent : public wxEvent  class pxActionEvent : public wxEvent
93  {  {
94          DECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxInvokeActionEvent)          DECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxActionEvent)
95    
96  protected:  protected:
97          SynchronousActionState* m_state;          SynchronousActionState* m_state;
98    
99  public:  public:
100          virtual ~pxInvokeActionEvent() throw() { }          virtual ~pxActionEvent() throw() { }
101          virtual pxInvokeActionEvent *Clone() const { return new pxInvokeActionEvent(*this); }          virtual pxActionEvent *Clone() const { return new pxActionEvent(*this); }
102    
103          explicit pxInvokeActionEvent( SynchronousActionState* sema=NULL, int msgtype=pxEvt_InvokeAction );          explicit pxActionEvent( SynchronousActionState* sema=NULL, int msgtype=pxEvt_InvokeAction );
104          explicit pxInvokeActionEvent( SynchronousActionState& sema, int msgtype=pxEvt_InvokeAction );          explicit pxActionEvent( SynchronousActionState& sema, int msgtype=pxEvt_InvokeAction );
105          pxInvokeActionEvent( const pxInvokeActionEvent& src );          pxActionEvent( const pxActionEvent& src );
106    
107          Threading::Semaphore* GetSemaphore() const { return m_state ? &m_state->GetSemaphore() : NULL; }          Threading::Semaphore* GetSemaphore() const { return m_state ? &m_state->GetSemaphore() : NULL; }
108    
# Line 118  public: Line 118  public:
118          virtual void _DoInvokeEvent();          virtual void _DoInvokeEvent();
119                    
120  protected:  protected:
121            // Extending classes should implement this method to perfoem whatever action it is
122            // the event is supposed to do. :)  Thread affinity is garaunteed to be the Main/UI
123            // thread, and exceptions will be handled automatically.
124            //
125            // Exception note: exceptions are passed back to the thread that posted the event
126            // to the queue, when possible.  If the calling thread is not blocking for a result
127            // from this event, then the exception will be posted to the Main/UI thread instead.
128          virtual void InvokeEvent() {}          virtual void InvokeEvent() {}
129  };  };
130    
# Line 125  protected: Line 132  protected:
132  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
133  //  pxExceptionEvent  //  pxExceptionEvent
134  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
135  class pxExceptionEvent : public pxInvokeActionEvent  class pxExceptionEvent : public pxActionEvent
136  {  {
137          typedef pxInvokeActionEvent _parent;          typedef pxActionEvent _parent;
138    
139  protected:  protected:
140          BaseException*  m_except;          BaseException*  m_except;
# Line 184  public: Line 191  public:
191  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
192  //  BaseMessageBoxEvent  //  BaseMessageBoxEvent
193  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
194  class BaseMessageBoxEvent : public pxInvokeActionEvent  class BaseMessageBoxEvent : public pxActionEvent
195  {  {
196          typedef pxInvokeActionEvent _parent;          typedef pxActionEvent _parent;
197          DECLARE_DYNAMIC_CLASS_NO_ASSIGN(BaseMessageBoxEvent)          DECLARE_DYNAMIC_CLASS_NO_ASSIGN(BaseMessageBoxEvent)
198    
199  protected:  protected:

Legend:
Removed from v.61  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22