#include "wx/intl.h"
#include "wx/evtloop.h"
#include "wx/hash.h"
+#include "wx/hashmap.h"
#if wxUSE_THREADS
#include "wx/thread.h"
#include <string.h>
+WX_DECLARE_VOIDPTR_HASH_MAP( wxXVisualInfo*, wxXVisualInfoMap );
+
extern wxList wxPendingDelete;
extern bool wxAddIdleCallback();
m_topLevelWidget = (WXWidget) NULL;
m_maxRequestSize = 0;
m_initialDisplay = (WXDisplay*) 0;
+ m_visualInfoMap = new wxXVisualInfoMap;
}
wxApp::~wxApp()
{
delete m_eventLoop;
+
+ for( wxXVisualInfoMap::iterator it = m_visualInfoMap->begin(),
+ end = m_visualInfoMap->end();
+ it != end; ++it )
+ {
+ delete it->second;
+ }
+
+ delete m_visualInfoMap;
}
bool wxApp::Initialized()
// Is a message/event pending?
bool wxApp::Pending()
{
+<<<<<<< app.cpp
+ return XtAppPending( (XtAppContext) GetAppContext() ) != 0;
+=======
return m_eventLoop->Pending();
#if 0
XFlush(XtDisplay( (Widget) wxTheApp->GetTopLevelWidget() ));
// is found.
return ((XtAppPending( (XtAppContext) GetAppContext() ) & XtIMXEvent) != 0) ;
#endif
+>>>>>>> 1.57
}
// Dispatch a message.
return (WXColormap) c;
}
+wxXVisualInfo* wxApp::GetVisualInfo( WXDisplay* display )
+{
+ wxXVisualInfoMap::iterator it = m_visualInfoMap->find( display );
+
+ if( it != m_visualInfoMap->end() ) return it->second;
+
+ wxXVisualInfo* vi = new wxXVisualInfo;
+ wxFillXVisualInfo( vi, (Display*)display );
+
+ (*m_visualInfoMap)[display] = vi;
+
+ return vi;
+}
+
void wxExit()
{
int retValue = 0;