Add wxUSE_HOTKEY support to configure.

Add --enable-hotkey switch to allow enabling hot keys support and enable it by
default under MSW and OS X that do support them but disable it elsewhere to
avoid unnecessary warnings about them being unsupported.

See #12354.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-09-01 18:43:03 +00:00
parent b8702c673a
commit 97e477c557
2 changed files with 80 additions and 0 deletions

View File

@@ -395,6 +395,7 @@ DEFAULT_wxUSE_UNICODE_UTF8=auto
DEFAULT_wxUSE_OPENGL=auto
DEFAULT_wxUSE_MEDIACTRL=auto
DEFAULT_wxUSE_COMPILER_TLS=auto
DEFAULT_wxUSE_HOTKEY=auto
DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
@@ -1039,6 +1040,7 @@ WX_ARG_FEATURE(splines, [ --enable-splines use spline drawing code],
WX_ARG_FEATURE(mousewheel, [ --enable-mousewheel use mousewheel], wxUSE_MOUSEWHEEL)
WX_ARG_FEATURE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS)
WX_ARG_FEATURE(busyinfo, [ --enable-busyinfo use wxBusyInfo], wxUSE_BUSYINFO)
WX_ARG_FEATURE(hotkey, [ --enable-hotkey use wxWindow::RegisterHotKey()], wxUSE_HOTKEY)
WX_ARG_FEATURE(joystick, [ --enable-joystick use wxJoystick], wxUSE_JOYSTICK)
WX_ARG_FEATURE(metafile, [ --enable-metafiles use wxMetaFile (Win32 only)], wxUSE_METAFILE)
WX_ARG_FEATURE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
@@ -5985,6 +5987,20 @@ if test "$wxUSE_BUSYINFO" = "yes"; then
AC_DEFINE(wxUSE_BUSYINFO)
fi
if test "$wxUSE_HOTKEY" = "yes"; then
if test "$wxUSE_MSW" != 1 -a "$wxUSE_OSX_COCOA" != 1 -a "$wxUSE_OSX_CARBON" != 1; then
AC_MSG_WARN([Hot keys not supported by the current toolkit, disabled])
wxUSE_HOTKEY=no
fi
elif test "$wxUSE_HOTKEY" = "auto"; then
if test "$wxUSE_MSW" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_OSX_CARBON" = 1; then
wxUSE_HOTKEY=yes
fi
fi
if test "$wxUSE_HOTKEY" = "yes"; then
AC_DEFINE(wxUSE_HOTKEY)
fi
if test "$wxUSE_STD_CONTAINERS" = "yes"; then
AC_DEFINE(wxUSE_STD_CONTAINERS)
fi