X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09e6e5ec02fdcf888062ac8a52fada2017608950..a7c26d107d0c6f191e55d30613f4816e9c2f9386:/include/wx/unix/gsockunx.h diff --git a/include/wx/unix/gsockunx.h b/include/wx/unix/gsockunx.h index e5eefa2c4e..8603d4290b 100644 --- a/include/wx/unix/gsockunx.h +++ b/include/wx/unix/gsockunx.h @@ -34,7 +34,7 @@ class GSocketBSD { public: GSocketBSD(); - ~GSocketBSD(); + virtual ~GSocketBSD(); bool IsOk() { return m_ok; } void Close(); void Shutdown(); @@ -70,6 +70,10 @@ protected: void Detected_Read(); void Detected_Write(); bool m_ok; + virtual void EventLoop_Enable_Events() = 0; + virtual void EventLoop_Disable_Events() = 0; + virtual void EventLoop_Install_Callback(GSocketEvent event) = 0; + virtual void EventLoop_Uninstall_Callback(GSocketEvent event) = 0; public: //DFE: We can't protect these data member until the GUI code is updated //protected: @@ -108,6 +112,30 @@ struct _GSocket #ifdef __cplusplus } #endif /* __cplusplus */ +#else +/////////////////////////////////////////////////////////////////////////// +// GSocketBSDGUIShim +class GSocketBSDGUIShim:public GSocketBSD +{ + friend void GSocket_SetGUIFunctions(struct GSocketGUIFunctionsTable *guifunc); +public: + static inline bool GUI_Init(); + static inline void GUI_Cleanup(); + static inline bool UseGUI(); + GSocketBSDGUIShim(); + virtual ~GSocketBSDGUIShim(); +protected: + virtual void EventLoop_Enable_Events(); + virtual void EventLoop_Disable_Events(); + virtual void EventLoop_Install_Callback(GSocketEvent event); + virtual void EventLoop_Uninstall_Callback(GSocketEvent event); +private: +/* Table of GUI-related functions. We must call them indirectly because + * of wxBase and GUI separation: */ + + static struct GSocketGUIFunctionsTable *ms_gui_functions; +}; + #endif //ndef wxUSE_GSOCKET_CPLUSPLUS #ifdef __cplusplus