X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83624f79609f0d5e240c1f7d77d044bfff9702fc..b2cad68016b67027003b1ff855c825f08a78bb3a:/src/gtk1/data.cpp diff --git a/src/gtk1/data.cpp b/src/gtk1/data.cpp index e72ca64abd..60234d0fd6 100644 --- a/src/gtk1/data.cpp +++ b/src/gtk1/data.cpp @@ -17,7 +17,8 @@ #include "wx/window.h" #include "wx/dc.h" #include "wx/accel.h" -#include "wx/postscrp.h" +#include "wx/dcps.h" +#include "wx/icon.h" #define _MAXPATHLEN 500 @@ -33,14 +34,20 @@ XrmDatabase wxResourceDatabase; char *wxBuffer = (char *) NULL; /* Windows List */ -wxList wxTopLevelWindows; +wxWindowList wxTopLevelWindows; /* List of windows pending deletion */ wxList wxPendingDelete; +#if wxUSE_THREADS +/* List of events pending processing */ +wxList *wxPendingEvents = NULL; +wxCriticalSection *wxPendingEventsLocker = NULL; +#endif + /* Current cursor, in order to hang on to * cursor handle when setting the cursor globally */ -wxCursor *g_globalCursor = (wxCursor *) NULL; +wxCursor g_globalCursor; /* Don't allow event propagation during drag */ bool g_blockEventsOnDrag = FALSE; @@ -48,6 +55,10 @@ bool g_blockEventsOnDrag = FALSE; /* Don't allow mouse event propagation during scroll */ bool g_blockEventsOnScroll = FALSE; +/* TRUE when the message queue is empty. this gets set to + FALSE by all event callbacks before anything else is done */ +bool g_isIdle = FALSE; + /* Message Strings for Internationalization */ char **wx_msg_str = (char**)NULL; @@ -59,7 +70,9 @@ char *wxOsVersion = (char *) NULL; /* For printing several pages */ int wxPageNumber; -wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; + +// Now in prntbase.cpp +// wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; /* GDI Object Lists */ wxBrushList *wxTheBrushList = (wxBrushList *) NULL; @@ -67,9 +80,11 @@ wxPenList *wxThePenList = (wxPenList *) NULL; wxFontList *wxTheFontList = (wxFontList *) NULL; wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; - + /* X only font names */ +/* wxFontNameDirectory *wxTheFontNameDirectory; +*/ /* Stock objects */ wxFont *wxNORMAL_FONT; @@ -101,7 +116,7 @@ wxBrush *wxLIGHT_GREY_BRUSH; wxColour *wxBLACK; wxColour *wxWHITE; -wxColour *wxGREY; +wxColour *wxGREY; wxColour *wxRED; wxColour *wxBLUE; wxColour *wxGREEN; @@ -113,56 +128,58 @@ wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; /* 'Null' objects */ -wxAcceleratorTable wxNullAcceleratorTable; +#if wxUSE_ACCEL + wxAcceleratorTable wxNullAcceleratorTable; +#endif // wxUSE_ACCEL + wxBitmap wxNullBitmap; -wxIcon wxNullIcon; +wxIcon wxNullIcon; wxCursor wxNullCursor; wxPen wxNullPen; wxBrush wxNullBrush; wxFont wxNullFont; wxColour wxNullColour; -wxPalette wxNullPalette; -wxRegion wxNullRegion; +wxPalette wxNullPalette; /* Default window names */ -const char *wxButtonNameStr = "button"; -const char *wxCanvasNameStr = "canvas"; -const char *wxCheckBoxNameStr = "check"; -const char *wxChoiceNameStr = "choice"; -const char *wxComboBoxNameStr = "comboBox"; -const char *wxDialogNameStr = "dialog"; -const char *wxFrameNameStr = "frame"; -const char *wxGaugeNameStr = "gauge"; -const char *wxStaticBoxNameStr = "groupBox"; -const char *wxListBoxNameStr = "listBox"; -const char *wxStaticTextNameStr = "message"; -const char *wxStaticBitmapNameStr = "message"; -const char *wxMultiTextNameStr = "multitext"; -const char *wxPanelNameStr = "panel"; -const char *wxRadioBoxNameStr = "radioBox"; -const char *wxRadioButtonNameStr = "radioButton"; -const char *wxBitmapRadioButtonNameStr = "radioButton"; -const char *wxScrollBarNameStr = "scrollBar"; -const char *wxSliderNameStr = "slider"; -const char *wxStaticNameStr = "static"; -const char *wxTextCtrlWindowNameStr = "textWindow"; -const char *wxTextCtrlNameStr = "text"; -const char *wxVirtListBoxNameStr = "virtListBox"; -const char *wxButtonBarNameStr = "buttonbar"; -const char *wxEnhDialogNameStr = "Shell"; -const char *wxToolBarNameStr = "toolbar"; -const char *wxStatusLineNameStr = "status_line"; -const char *wxEmptyString = ""; -const char *wxGetTextFromUserPromptStr = "Input Text"; -const char *wxMessageBoxCaptionStr = "Message"; -const char *wxFileSelectorPromptStr = "Select a file"; -const char *wxFileSelectorDefaultWildcardStr = "*.*"; -const char *wxInternalErrorStr = "wxWindows Internal Error"; -const char *wxFatalErrorStr = "wxWindows Fatal Error"; +const wxChar *wxButtonNameStr = _T("button"); +const wxChar *wxCanvasNameStr = _T("canvas"); +const wxChar *wxCheckBoxNameStr = _T("check"); +const wxChar *wxChoiceNameStr = _T("choice"); +const wxChar *wxComboBoxNameStr = _T("comboBox"); +const wxChar *wxDialogNameStr = _T("dialog"); +const wxChar *wxFrameNameStr = _T("frame"); +const wxChar *wxGaugeNameStr = _T("gauge"); +const wxChar *wxStaticBoxNameStr = _T("groupBox"); +const wxChar *wxListBoxNameStr = _T("listBox"); +const wxChar *wxStaticTextNameStr = _T("message"); +const wxChar *wxStaticBitmapNameStr = _T("message"); +const wxChar *wxMultiTextNameStr = _T("multitext"); +const wxChar *wxPanelNameStr = _T("panel"); +const wxChar *wxRadioBoxNameStr = _T("radioBox"); +const wxChar *wxRadioButtonNameStr = _T("radioButton"); +const wxChar *wxBitmapRadioButtonNameStr = _T("radioButton"); +const wxChar *wxScrollBarNameStr = _T("scrollBar"); +const wxChar *wxSliderNameStr = _T("slider"); +const wxChar *wxStaticNameStr = _T("static"); +const wxChar *wxTextCtrlWindowNameStr = _T("textWindow"); +const wxChar *wxTextCtrlNameStr = _T("text"); +const wxChar *wxVirtListBoxNameStr = _T("virtListBox"); +const wxChar *wxButtonBarNameStr = _T("buttonbar"); +const wxChar *wxEnhDialogNameStr = _T("Shell"); +const wxChar *wxToolBarNameStr = _T("toolbar"); +const wxChar *wxStatusLineNameStr = _T("status_line"); +const wxChar *wxEmptyString = _T(""); +const wxChar *wxGetTextFromUserPromptStr = _T("Input Text"); +const wxChar *wxMessageBoxCaptionStr = _T("Message"); +const wxChar *wxFileSelectorPromptStr = _T("Select a file"); +const wxChar *wxFileSelectorDefaultWildcardStr = _T("*.*"); +const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error"); +const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error"); /* See wx/utils.h */ -const char *wxFloatToStringStr = "%.2f"; -const char *wxDoubleToStringStr = "%.2f"; +const wxChar *wxFloatToStringStr = _T("%.2f"); +const wxChar *wxDoubleToStringStr = _T("%.2f"); /* Dafaults for wxWindow etc. */ const wxSize wxDefaultSize(-1, -1);