2014-06-23 21:59:34 +10:00
|
|
|
/*
|
|
|
|
* ***** 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 ED_paint.h
|
|
|
|
* \ingroup editors
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ED_PAINT_H__
|
|
|
|
#define __ED_PAINT_H__
|
|
|
|
|
|
|
|
struct bContext;
|
|
|
|
struct wmKeyConfig;
|
2014-07-21 12:02:05 +02:00
|
|
|
struct wmOperator;
|
2014-06-23 21:59:34 +10:00
|
|
|
|
|
|
|
/* paint_ops.c */
|
|
|
|
void ED_operatortypes_paint(void);
|
2014-07-21 12:02:05 +02:00
|
|
|
void ED_operatormacros_paint(void);
|
2014-06-23 21:59:34 +10:00
|
|
|
void ED_keymap_paint(struct wmKeyConfig *keyconf);
|
|
|
|
|
|
|
|
/* paint_undo.c */
|
|
|
|
enum {
|
|
|
|
UNDO_PAINT_IMAGE = 0,
|
|
|
|
UNDO_PAINT_MESH = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef void (*UndoRestoreCb)(struct bContext *C, struct ListBase *lb);
|
|
|
|
typedef void (*UndoFreeCb)(struct ListBase *lb);
|
2014-07-21 12:02:05 +02:00
|
|
|
typedef bool (*UndoCleanupCb)(struct bContext *C, struct ListBase *lb);
|
2014-06-23 21:59:34 +10:00
|
|
|
|
|
|
|
int ED_undo_paint_step(struct bContext *C, int type, int step, const char *name);
|
|
|
|
void ED_undo_paint_step_num(struct bContext *C, int type, int num);
|
2015-04-18 15:41:12 +02:00
|
|
|
const char *ED_undo_paint_get_name(struct bContext *C, int type, int nr, bool *r_active);
|
2014-06-23 21:59:34 +10:00
|
|
|
void ED_undo_paint_free(void);
|
2015-04-18 15:41:12 +02:00
|
|
|
bool ED_undo_paint_is_valid(int type, const char *name);
|
2014-06-23 21:59:34 +10:00
|
|
|
bool ED_undo_paint_empty(int type);
|
2014-07-21 12:02:05 +02:00
|
|
|
void ED_undo_paint_push_begin(int type, const char *name, UndoRestoreCb restore, UndoFreeCb free, UndoCleanupCb cleanup);
|
2014-06-23 21:59:34 +10:00
|
|
|
void ED_undo_paint_push_end(int type);
|
|
|
|
|
|
|
|
/* paint_image.c */
|
|
|
|
/* image painting specific undo */
|
|
|
|
void ED_image_undo_restore(struct bContext *C, struct ListBase *lb);
|
|
|
|
void ED_image_undo_free(struct ListBase *lb);
|
|
|
|
void ED_imapaint_clear_partial_redraw(void);
|
2015-04-30 13:52:25 +02:00
|
|
|
void ED_imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h, bool find_old);
|
2014-07-21 12:02:05 +02:00
|
|
|
void ED_imapaint_bucket_fill(struct bContext *C, float color[3], struct wmOperator *op);
|
2014-06-23 21:59:34 +10:00
|
|
|
|
|
|
|
#endif /* __ED_PAINT_H__ */
|