From d72ef11e87b282ae3858f53a9fbccb51c184b0c8 Mon Sep 17 00:00:00 2001 From: Robin Dunn <> Date: Tue, 24 Mar 2020 13:19:34 -0700 Subject: [PATCH] Add --disable-nativeanimation configure option, and wxUSE_NATIVE_ANIMATIONCTRL --- configure | 37 +++++++++++++++++++++++++++++++++++++ configure.in | 6 ++++++ include/wx/android/setup.h | 9 +++++++++ include/wx/gtk/setup0.h | 9 +++++++++ include/wx/motif/setup0.h | 9 +++++++++ include/wx/msw/setup0.h | 9 +++++++++ include/wx/osx/setup0.h | 9 +++++++++ include/wx/setup_inc.h | 9 +++++++++ include/wx/univ/setup0.h | 9 +++++++++ setup.h.in | 2 ++ setup.h_vms | 2 ++ 11 files changed, 110 insertions(+) diff --git a/configure b/configure index e694f0985a..b1049a8ec4 100755 --- a/configure +++ b/configure @@ -1253,6 +1253,7 @@ enable_comboctrl enable_commandlinkbutton enable_dataviewctrl enable_nativedvc +enable_nativeanimation enable_datepick enable_detect_sm enable_dirpicker @@ -2208,6 +2209,7 @@ Optional Features: --enable-commandlinkbutton use wxCommmandLinkButton class --enable-dataviewctrl use wxDataViewCtrl class --disable-nativedvc disable use of native wxDataViewCtrl even if available + --disable-nativeanimation disable use of native wxAnimationCtrl (and supporting classes) even if available --enable-datepick use wxDatePickerCtrl class --enable-detect_sm use code to detect X11 session manager --enable-dirpicker use wxDirPickerCtrl class @@ -9758,6 +9760,35 @@ fi eval "$wx_cv_use_nativedvc" + enablestring=disable + defaultval= + if test -z "$defaultval"; then + if test x"$enablestring" = xdisable; then + defaultval=yes + else + defaultval=no + fi + fi + + # Check whether --enable-nativeanimation was given. +if test "${enable_nativeanimation+set}" = set; then : + enableval=$enable_nativeanimation; + if test "$enableval" = yes; then + wx_cv_use_nativeanimation='wxUSE_NATIVE_ANIMATIONCTRL=yes' + else + wx_cv_use_nativeanimation='wxUSE_NATIVE_ANIMATIONCTRL=no' + fi + +else + + wx_cv_use_nativeanimation='wxUSE_NATIVE_ANIMATIONCTRL=${'DEFAULT_wxUSE_NATIVE_ANIMATIONCTRL":-$defaultval}" + +fi + + + eval "$wx_cv_use_nativeanimation" + + enablestring= defaultval=$wxUSE_ALL_FEATURES if test -z "$defaultval"; then @@ -35766,6 +35797,12 @@ if test "$wxUSE_ANIMATIONCTRL" = "yes"; then USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS animate" + + if test "$wxUSE_NATIVE_ANIMATIONCTRL" = "yes"; then + $as_echo "#define wxUSE_NATIVE_ANIMATIONCTRL 1" >>confdefs.h + + fi + fi if test "$wxUSE_BANNERWINDOW" = "yes"; then diff --git a/configure.in b/configure.in index 76039da63c..a9af45a012 100644 --- a/configure.in +++ b/configure.in @@ -934,6 +934,7 @@ WX_ARG_FEATURE(comboctrl, [ --enable-comboctrl use wxComboCtrl class], w WX_ARG_FEATURE(commandlinkbutton, [ --enable-commandlinkbutton use wxCommmandLinkButton class], wxUSE_COMMANDLINKBUTTON) WX_ARG_FEATURE(dataviewctrl,[ --enable-dataviewctrl use wxDataViewCtrl class], wxUSE_DATAVIEWCTRL) WX_ARG_DISABLE(nativedvc, [ --disable-nativedvc disable use of native wxDataViewCtrl even if available], wxUSE_NATIVE_DATAVIEWCTRL) +WX_ARG_DISABLE(nativeanimation, [ --disable-nativeanimation disable use of native wxAnimationCtrl (and supporting classes) even if available], wxUSE_NATIVE_ANIMATIONCTRL) WX_ARG_FEATURE(datepick, [ --enable-datepick use wxDatePickerCtrl class], wxUSE_DATEPICKCTRL) WX_ARG_FEATURE(detect_sm, [ --enable-detect_sm use code to detect X11 session manager], wxUSE_DETECT_SM) WX_ARG_FEATURE(dirpicker, [ --enable-dirpicker use wxDirPickerCtrl class], wxUSE_DIRPICKERCTRL) @@ -6699,6 +6700,11 @@ if test "$wxUSE_ANIMATIONCTRL" = "yes"; then AC_DEFINE(wxUSE_ANIMATIONCTRL) USES_CONTROLS=1 SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS animate" + + if test "$wxUSE_NATIVE_ANIMATIONCTRL" = "yes"; then + AC_DEFINE(wxUSE_NATIVE_ANIMATIONCTRL) + fi + fi if test "$wxUSE_BANNERWINDOW" = "yes"; then diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index af4585828d..84e951d014 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -922,6 +922,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index 639f912d52..82a7e43eae 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -923,6 +923,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 7f7ff9eb8a..8b24dcec32 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -923,6 +923,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index e7b9d06668..f8bc121909 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -923,6 +923,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index d45ea59db7..430224fd01 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -929,6 +929,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 99e95fd8b7..cd9a823592 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -919,6 +919,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 7c2852039b..16a78a50fa 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -922,6 +922,15 @@ // the native control limitations. #define wxUSE_NATIVE_DATAVIEWCTRL 1 +// Use generic version of wxAnimationCtrl and supporting classes, even if a +// native one is available? +// +// Default is 1. +// +// Recommended setting: 1, but can be set to 0 if your program is affected by +// the native control limitations. +#define wxUSE_NATIVE_ANIMATIONCTRL 1 + // Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR // below either wxStatusBar95 or a generic wxStatusBar will be used. // diff --git a/setup.h.in b/setup.h.in index 26ed7a7d14..b43ec55c36 100644 --- a/setup.h.in +++ b/setup.h.in @@ -415,6 +415,8 @@ #define wxUSE_NATIVE_DATAVIEWCTRL 0 +#define wxUSE_NATIVE_ANIMATIONCTRL 0 + #define wxUSE_STATUSBAR 0 #define wxUSE_NATIVE_STATUSBAR 0 diff --git a/setup.h_vms b/setup.h_vms index 92efe12b49..51334a9fc0 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -465,6 +465,8 @@ typedef pid_t GPid; #define wxUSE_NATIVE_DATAVIEWCTRL 0 +#define wxUSE_NATIVE_ANIMATIONCTRL 0 + #define wxUSE_STATUSBAR 1 #define wxUSE_NATIVE_STATUSBAR 0