2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
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
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2009-07-16 00:50:27 +00:00
|
|
|
|
|
|
|
|
/* internal exports only */
|
|
|
|
|
|
2025-01-07 12:39:13 +01:00
|
|
|
struct ARegion;
|
2009-07-16 00:50:27 +00:00
|
|
|
struct ConsoleLine;
|
2025-01-07 12:39:13 +01:00
|
|
|
struct SpaceConsole;
|
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
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `console_draw.cc` */
|
2022-04-04 13:17:03 +10:00
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
void console_textview_main(SpaceConsole *sc, const ARegion *region);
|
2022-09-19 14:47:27 +10:00
|
|
|
/* Needed to calculate the scroll-bar. */
|
2023-08-03 01:11:28 +02:00
|
|
|
int console_textview_height(SpaceConsole *sc, const ARegion *region);
|
|
|
|
|
int console_char_pick(SpaceConsole *sc, const ARegion *region, const int mval[2]);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
void console_scrollback_prompt_begin(SpaceConsole *sc, ConsoleLine *cl_dummy);
|
|
|
|
|
void console_scrollback_prompt_end(SpaceConsole *sc, ConsoleLine *cl_dummy);
|
2010-10-04 12:02:18 +00:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `console_ops.cc` */
|
2022-04-04 13:17:03 +10:00
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
void console_history_free(SpaceConsole *sc, ConsoleLine *cl);
|
|
|
|
|
void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl);
|
2023-08-03 01:11:28 +02:00
|
|
|
ConsoleLine *console_history_add_str(SpaceConsole *sc, char *str, bool own);
|
|
|
|
|
ConsoleLine *console_scrollback_add_str(SpaceConsole *sc, char *str, bool own);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
ConsoleLine *console_history_verify(const 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
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
void CONSOLE_OT_move(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_delete(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_insert(wmOperatorType *ot);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
void CONSOLE_OT_indent(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_indent_or_autocomplete(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_unindent(wmOperatorType *ot);
|
2012-06-04 07:24:19 +00:00
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
void CONSOLE_OT_history_append(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_scrollback_append(wmOperatorType *ot);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2023-08-03 01:11:28 +02:00
|
|
|
void CONSOLE_OT_clear(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_clear_line(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_history_cycle(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_copy(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_paste(wmOperatorType *ot);
|
|
|
|
|
void CONSOLE_OT_select_set(wmOperatorType *ot);
|
2023-09-22 13:29:17 +10:00
|
|
|
void CONSOLE_OT_select_all(wmOperatorType *ot);
|
2023-08-03 01:11:28 +02:00
|
|
|
void CONSOLE_OT_select_word(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 };
|
2017-09-21 20:41:09 +10:00
|
|
|
enum {
|
|
|
|
|
DEL_NEXT_CHAR,
|
|
|
|
|
DEL_PREV_CHAR,
|
|
|
|
|
DEL_NEXT_WORD,
|
|
|
|
|
DEL_PREV_WORD,
|
|
|
|
|
DEL_SELECTION,
|
|
|
|
|
DEL_NEXT_SEL,
|
|
|
|
|
DEL_PREV_SEL
|
|
|
|
|
};
|