2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-07-16 00:50:27 +00:00
|
|
|
* 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
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2009-07-16 00:50:27 +00:00
|
|
|
*
|
|
|
|
|
* 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-07-16 00:50:27 +00:00
|
|
|
*/
|
2011-02-27 20:29:51 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup spconsole
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
2020-08-07 09:50:34 +02:00
|
|
|
#pragma once
|
2009-07-16 00:50:27 +00:00
|
|
|
|
|
|
|
|
/* internal exports only */
|
|
|
|
|
|
|
|
|
|
struct ConsoleLine;
|
2009-07-28 08:50:11 +00:00
|
|
|
struct bContext;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct wmOperatorType;
|
2009-07-16 00:50:27 +00:00
|
|
|
|
|
|
|
|
/* console_draw.c */
|
2020-03-06 16:56:42 +01:00
|
|
|
void console_textview_main(struct SpaceConsole *sc, const struct ARegion *region);
|
2019-01-15 23:24:20 +11:00
|
|
|
/* needed to calculate the scrollbar */
|
2020-03-06 16:56:42 +01:00
|
|
|
int console_textview_height(struct SpaceConsole *sc, const struct ARegion *region);
|
|
|
|
|
int console_char_pick(struct SpaceConsole *sc, const struct ARegion *region, const int mval[2]);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2010-10-04 12:02:18 +00:00
|
|
|
void console_scrollback_prompt_begin(struct SpaceConsole *sc, ConsoleLine *cl_dummy);
|
|
|
|
|
void console_scrollback_prompt_end(struct SpaceConsole *sc, ConsoleLine *cl_dummy);
|
|
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
/* console_ops.c */
|
|
|
|
|
void console_history_free(SpaceConsole *sc, ConsoleLine *cl);
|
|
|
|
|
void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl);
|
2013-03-19 23:17:44 +00:00
|
|
|
ConsoleLine *console_history_add_str(struct SpaceConsole *sc, char *str, bool own);
|
|
|
|
|
ConsoleLine *console_scrollback_add_str(struct SpaceConsole *sc, char *str, bool own);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2009-07-28 08:50:11 +00:00
|
|
|
ConsoleLine *console_history_verify(const struct bContext *C);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
void console_textview_update_rect(SpaceConsole *sc, ARegion *region);
|
2015-12-18 16:02:31 +11:00
|
|
|
|
2009-12-24 16:10:26 +00:00
|
|
|
void CONSOLE_OT_move(struct wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_delete(struct wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_insert(struct wmOperatorType *ot);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2012-06-04 07:24:19 +00:00
|
|
|
void CONSOLE_OT_indent(struct wmOperatorType *ot);
|
2019-11-22 20:50:17 +11:00
|
|
|
void CONSOLE_OT_indent_or_autocomplete(struct wmOperatorType *ot);
|
2012-06-04 07:24:19 +00:00
|
|
|
void CONSOLE_OT_unindent(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-12-24 16:10:26 +00:00
|
|
|
void CONSOLE_OT_history_append(struct wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_scrollback_append(struct wmOperatorType *ot);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2009-12-24 16:10:26 +00:00
|
|
|
void CONSOLE_OT_clear(struct wmOperatorType *ot);
|
2012-05-09 14:58:57 +00:00
|
|
|
void CONSOLE_OT_clear_line(struct wmOperatorType *ot);
|
2009-12-24 16:10:26 +00:00
|
|
|
void CONSOLE_OT_history_cycle(struct wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_copy(struct wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_paste(struct wmOperatorType *ot);
|
2009-12-27 20:22:06 +00:00
|
|
|
void CONSOLE_OT_select_set(struct wmOperatorType *ot);
|
2015-03-16 16:01:32 +11:00
|
|
|
void CONSOLE_OT_select_word(struct wmOperatorType *ot);
|
2009-12-27 20:22:06 +00:00
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD };
|
2019-04-17 06:17:24 +02:00
|
|
|
enum {
|
|
|
|
|
DEL_NEXT_CHAR,
|
|
|
|
|
DEL_PREV_CHAR,
|
|
|
|
|
DEL_NEXT_WORD,
|
|
|
|
|
DEL_PREV_WORD,
|
|
|
|
|
DEL_SELECTION,
|
|
|
|
|
DEL_NEXT_SEL,
|
|
|
|
|
DEL_PREV_SEL
|
|
|
|
|
};
|