diff options
Diffstat (limited to 'app/config/gimpcoreconfig.c')
-rw-r--r-- | app/config/gimpcoreconfig.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/app/config/gimpcoreconfig.c b/app/config/gimpcoreconfig.c index 823e808..3e033c2 100644 --- a/app/config/gimpcoreconfig.c +++ b/app/config/gimpcoreconfig.c @@ -133,6 +133,9 @@ enum PROP_LAST_RELEASE_COMMENT, PROP_LAST_REVISION, PROP_LAST_KNOWN_RELEASE, +#ifdef G_OS_WIN32 + PROP_WIN32_POINTER_INPUT_API, +#endif /* ignored, only for backward compatibility: */ PROP_INSTALL_COLORMAP, @@ -815,6 +818,17 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass) #endif GIMP_PARAM_STATIC_STRINGS); +#ifdef G_OS_WIN32 + GIMP_CONFIG_PROP_ENUM (object_class, PROP_WIN32_POINTER_INPUT_API, + "win32-pointer-input-api", + "Pointer Input API", + WIN32_POINTER_INPUT_API_BLURB, + GIMP_TYPE_WIN32_POINTER_INPUT_API, + GIMP_WIN32_POINTER_INPUT_API_WINTAB, + GIMP_PARAM_STATIC_STRINGS | + GIMP_CONFIG_PARAM_RESTART); +#endif + /* only for backward compatibility: */ GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP, "install-colormap", @@ -1152,6 +1166,30 @@ gimp_core_config_set_property (GObject *object, case PROP_DEBUG_POLICY: core_config->debug_policy = g_value_get_enum (value); break; +#ifdef G_OS_WIN32 + case PROP_WIN32_POINTER_INPUT_API: + { + GimpWin32PointerInputAPI api = g_value_get_enum (value); + gboolean have_wintab = gimp_win32_have_wintab (); + gboolean have_windows_ink = gimp_win32_have_windows_ink (); + gboolean api_is_wintab = (api == GIMP_WIN32_POINTER_INPUT_API_WINTAB); + gboolean api_is_windows_ink = (api == GIMP_WIN32_POINTER_INPUT_API_WINDOWS_INK); + + if (api_is_wintab && !have_wintab && have_windows_ink) + { + core_config->win32_pointer_input_api = GIMP_WIN32_POINTER_INPUT_API_WINDOWS_INK; + } + else if (api_is_windows_ink && !have_windows_ink && have_wintab) + { + core_config->win32_pointer_input_api = GIMP_WIN32_POINTER_INPUT_API_WINTAB; + } + else + { + core_config->win32_pointer_input_api = api; + } + } + break; +#endif case PROP_INSTALL_COLORMAP: case PROP_MIN_COLORS: @@ -1378,6 +1416,11 @@ gimp_core_config_get_property (GObject *object, case PROP_DEBUG_POLICY: g_value_set_enum (value, core_config->debug_policy); break; +#ifdef G_OS_WIN32 + case PROP_WIN32_POINTER_INPUT_API: + g_value_set_enum (value, core_config->win32_pointer_input_api); + break; +#endif case PROP_INSTALL_COLORMAP: case PROP_MIN_COLORS: |