diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-12-12 07:16:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-12-12 07:44:59 +0300 |
commit | b3c147a04f16f6fe8ea4c902f9d58ec5dbcdb392 (patch) | |
tree | 6bda963409d858c7688bc13434e6a01f5891a7e6 /source/blender/editors/interface/interface_eyedropper_intern.h | |
parent | 58aa31a9ec0fc5b7dbef02b4308a826b49abf3d8 (diff) |
Cleanup: split eyedropper into separate files
Each handles separate data-types and didn't share much logic,
better put each in it's own file.
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper_intern.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_intern.h b/source/blender/editors/interface/interface_eyedropper_intern.h new file mode 100644 index 00000000000..18935c6cc9f --- /dev/null +++ b/source/blender/editors/interface/interface_eyedropper_intern.h @@ -0,0 +1,54 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/editors/interface/interface_eyedropper_intern.h + * \ingroup edinterface + * + * Share between interface_eyedropper_*.c files. + */ + +#ifndef __INTERFACE_EYEDROPPER_INTERN_H__ +#define __INTERFACE_EYEDROPPER_INTERN_H__ + +/* interface_eyedropper.c */ +void eyedropper_draw_cursor_text(const struct bContext *C, const struct ARegion *ar, const char *name); +uiBut *eyedropper_get_property_button_under_mouse(bContext *C, const wmEvent *event); + +/* interface_eyedropper_color.c (expose for color-band picker) */ +void eyedropper_color_sample_fl(bContext *C, int mx, int my, float r_col[3]); + +/* Used for most eye-dropper operators. */ +enum { + EYE_MODAL_CANCEL = 1, + EYE_MODAL_SAMPLE_CONFIRM, + EYE_MODAL_SAMPLE_BEGIN, + EYE_MODAL_SAMPLE_RESET, +}; + +/* Color-band point sample. */ +enum { + EYE_MODAL_POINT_CANCEL = 1, + EYE_MODAL_POINT_SAMPLE, + EYE_MODAL_POINT_CONFIRM, + EYE_MODAL_POINT_RESET, + EYE_MODAL_POINT_REMOVE_LAST, +}; + +#endif /* __INTERFACE_EYEDROPPER_INTERN_H__ */ |