]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/utilsgui.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: palmos/utilsgui.cpp
3 // Purpose: Various utility functions only available in GUI
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // for compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
28 #include "wx/cursor.h"
29 #include "wx/window.h"
33 // ============================================================================
35 // ============================================================================
37 // ----------------------------------------------------------------------------
38 // functions to work with .INI files
39 // ----------------------------------------------------------------------------
41 // Reading and writing resources (eg WIN.INI, .Xdefaults)
43 bool wxWriteResource(const wxString
& section
, const wxString
& entry
, const wxString
& value
, const wxString
& file
)
48 bool wxWriteResource(const wxString
& section
, const wxString
& entry
, float value
, const wxString
& file
)
53 bool wxWriteResource(const wxString
& section
, const wxString
& entry
, long value
, const wxString
& file
)
58 bool wxWriteResource(const wxString
& section
, const wxString
& entry
, int value
, const wxString
& file
)
63 bool wxGetResource(const wxString
& section
, const wxString
& entry
, wxChar
**value
, const wxString
& file
)
68 bool wxGetResource(const wxString
& section
, const wxString
& entry
, float *value
, const wxString
& file
)
73 bool wxGetResource(const wxString
& section
, const wxString
& entry
, long *value
, const wxString
& file
)
78 bool wxGetResource(const wxString
& section
, const wxString
& entry
, int *value
, const wxString
& file
)
82 #endif // wxUSE_RESOURCES
84 // ---------------------------------------------------------------------------
85 // helper functions for showing a "busy" cursor
86 // ---------------------------------------------------------------------------
88 static int gs_wxBusyCursorCount
= 0;
90 // Set the cursor to the busy cursor for all windows
91 void wxBeginBusyCursor(wxCursor
*cursor
)
95 // Restore cursor to normal
96 void wxEndBusyCursor()
100 // true if we're between the above two calls
106 // Check whether this window wants to process messages, e.g. Stop button
107 // in long calculations.
108 bool wxCheckForInterrupt(wxWindow
*wnd
)
113 // MSW only: get user-defined resource from the .res file.
114 // Returns NULL or newly-allocated memory, so use delete[] to clean up.
116 wxChar
*wxLoadUserResource(const wxString
& resourceName
, const wxString
& resourceType
)
121 // ----------------------------------------------------------------------------
123 // ----------------------------------------------------------------------------
125 // See also the wxGetMousePosition in window.cpp
126 // Deprecated: use wxPoint wxGetMousePosition() instead
127 void wxGetMousePosition( int* x
, int* y
)
131 // Return true if we have a colour display
132 bool wxColourDisplay()
137 // Returns depth of screen
143 // Get size of display
144 void wxDisplaySize(int *width
, int *height
)
148 void wxDisplaySizeMM(int *width
, int *height
)
152 void wxClientDisplayRect(int *x
, int *y
, int *width
, int *height
)
156 // ---------------------------------------------------------------------------
157 // window information functions
158 // ---------------------------------------------------------------------------
160 wxString WXDLLEXPORT
wxGetWindowText(WXHWND hWnd
)
167 wxString WXDLLEXPORT
wxGetWindowClass(WXHWND hWnd
)
174 WXWORD WXDLLEXPORT
wxGetWindowId(WXHWND hWnd
)