1. Integer instead of floating point arithmetic should be used in calculations.
2. Because this function always returns 2 hexadecimal characters, its parameter type should be changed from 'int' to 'unsigned char' to avoid misunderstandings and prevent misuses.
Closes#12612.
wxGetKeyState() does not currently work on non-X11 GTK backends, and in some
cases it has been reported to crash. It seems that the most likely use case
for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use
GTK+ calls to retrieve the modifier key state.
Non-modifier keys are not currently implemented, update the documentation to
mention this.
Closes https://github.com/wxWidgets/wxWidgets/pull/320
In addition to getting a major and minor OS version allow a micro
version to be retrieved. In case of running on e.g. OS X 10.10.3 this
allows the "3" to be retrieved again.
Windows implements VerifyVersionInfo api since Win2k. Starting with Windows 8.1 GetVersionEx is deprecated and may not return the expected version number if the application does not contain the correct compatibility information in its manifest. VerifyVersionInfo works independent of manifest in the executable (and is the recommend way to check).
Existing code may already use wxPlatformInfo::CheckOSVersion() so the method forwards the call to wxCheckOsVersion if initialized for the current system.
Some OS versions mentioned were a little bit outdated and the paragraph about wxGetHostName on Windows simply didn’t match the implementation any more.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxKill(wxSIGTERM) doesn't work if the child process has no open windows as it
doesn't have anything to post the WM_QUIT message to.
Document this and point out that wxKill(wxSIGKILL) still works in this case.
Closes#15356.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The functions are available in wxBase builds too, but wx/windowid.h
isn't. Rather than always including that header, just use int, for which
wxWindowID is a typedef. This keeps the functions available in wxBase
for compatibility and is consistent with how IDs are handled in other
parts of wxBase, particularly wxEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxNewId(), wxRegisterId() and wxGetCurrentId() functions all work with
window IDs, so they should use the dedicated type. Previously, they
worked with long, which is not even the same type (wxWindowID is int),
causing implicit type conversion warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document the new and preferred overload avoiding copying the data. Also
document the new (since 2.9.1) parameters of the old one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.
Closes#14406.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use ChildWindowFromPointEx(CWP_SKIPINVISIBLE) to ensure that we find the
disabled children (by not using CWP_SKIPDISABLED).
Add a unit test to check for the correct behaviour in all cases and document
it.
Closes#2942.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also renamed wxEXEC_NOHIDE to wxEXEC_SHOW_CONSOLE for symmetry (keeping the
old name for compatibility, of course).
Extend exec sample to allow easily testing the different flags and adding more
of them later.
See #13676.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These flags were described in wxExecute() documentation but not clearly
documented individually, do it now.
Also reduce duplication of documentation in different wxExecute() overloads.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't make sense to require passing C functions to wxQsort() that we
define in a C++ library. We also don't need any special calling convention
here.
Notice that the only existing uses of wxQsort() inside wxWidgets itself were
not actually extern "C" and one of them didn't even use the correct calling
convention.
Also avoid using non-wx-prefixed CMPFUNCDATA identifier in a public header,
rename it to wxSortCallback instead.
Finally make wxQsort() documentation slightly more useful.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It may be unexpected that the application can still be closed from the taskbar
even if its main window is disabled. Mention this in the documentation and
indicate how to prevent this from happening if required.
Closes#13081.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function uses the GUI toolkit information and so can't be defined in
wxBase. The code only compiled before because the function was erroneously
defined in wxCore even though it was declared as WXDLLIMPEXP_BASE.
Fix this by declaring it with WXDLLIMPEXP_CORE too. This corrects problems in
MSW DLL build.
If we need to get a string containing user-readable wxBase version too, we
should add another function (as it's not possible to virtualize this one) but
such function doesn't seem incredibly useful to have anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add simple wxVersionInfo class holding the version information.
Also add GetLibraryVersionInfo() static method to wx{JPEG,PNG,TIFF}Handler,
wxStyledTextCtrl and wxXmlDocument classes and wxGetZlibVersionInfo() and
wxGetLibraryVersionInfo() global functions using it.
Closes#12690.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.
Closes#12163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MinGW uses the same CRT as MSVC so we can use the same _putenv() call for it
too. This ensures that wxGetenv() returns the value updated by wxSetEnv() and
fixes CrtTestCase::SetGetEnv() unit test when using MinGW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document that wxOS_UNIX, wxOS_MAC and wxOS_WINDOWS enum values are combinations of other values (unfortunately doxygen does not show the definition of those symbols in the HTML docs so we need to explicitely state that).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775