[gimp/metadata-browser] app: add a utility function that returns the "constrain" modifier
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: add a utility function that returns the "constrain" modifier
- Date: Fri, 2 Dec 2011 02:11:11 +0000 (UTC)
commit acbb13bba613b277adc74ad25bc2c3933b2be390
Author: Michael Natterer <mitch gimp org>
Date: Thu Oct 6 16:42:42 2011 +0200
app: add a utility function that returns the "constrain" modifier
app/widgets/gimpwidgets-utils.c | 10 ++++++++++
app/widgets/gimpwidgets-utils.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 4fd6b8d..b499c6a 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -697,6 +697,16 @@ gimp_get_toggle_behavior_mask (void)
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
}
+GdkModifierType
+gimp_get_constrain_behavior_mask (void)
+{
+ GdkDisplay *display = gdk_display_get_default ();
+
+ /* use the modify selection modifier */
+ return gdk_keymap_get_modifier_mask (gdk_keymap_get_for_display (display),
+ GDK_MODIFIER_INTENT_MODIFY_SELECTION);
+}
+
/**
* gimp_get_screen_resolution:
* @screen: a #GdkScreen or %NULL
diff --git a/app/widgets/gimpwidgets-utils.h b/app/widgets/gimpwidgets-utils.h
index 894860f..6385250 100644
--- a/app/widgets/gimpwidgets-utils.h
+++ b/app/widgets/gimpwidgets-utils.h
@@ -63,6 +63,7 @@ GdkModifierType gimp_replace_virtual_modifiers (GdkModifierType modifi
GdkModifierType gimp_get_extend_selection_mask (void);
GdkModifierType gimp_get_modify_selection_mask (void);
GdkModifierType gimp_get_toggle_behavior_mask (void);
+GdkModifierType gimp_get_constrain_behavior_mask (void);
void gimp_get_screen_resolution (GdkScreen *screen,
gdouble *xres,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]