When using clangd or running clang-tidy on headers there are currently many errors. These are noisy in IDEs, make auto fixes impossible, and break features like code completion, refactoring and navigation. This makes source/blender headers work by themselves, which is generally the goal anyway. But #includes and forward declarations were often incomplete. * Add #includes and forward declarations * Add IWYU pragma: export in a few places * Remove some unused #includes (but there are many more) * Tweak ShaderCreateInfo macros to work better with clangd Some types of headers still have errors, these could be fixed or worked around with more investigation. Mostly preprocessor template headers like NOD_static_types.h. Note that that disabling WITH_UNITY_BUILD is required for clangd to work properly, otherwise compile_commands.json does not contain the information for the relevant source files. For more details see the developer docs: https://developer.blender.org/docs/handbook/tooling/clangd/ Pull Request: https://projects.blender.org/blender/blender/pulls/132608
70 lines
2.1 KiB
C++
70 lines
2.1 KiB
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup spconsole
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* internal exports only */
|
|
|
|
struct ARegion;
|
|
struct ConsoleLine;
|
|
struct SpaceConsole;
|
|
struct bContext;
|
|
struct wmOperatorType;
|
|
|
|
/* `console_draw.cc` */
|
|
|
|
void console_textview_main(SpaceConsole *sc, const ARegion *region);
|
|
/* Needed to calculate the scroll-bar. */
|
|
int console_textview_height(SpaceConsole *sc, const ARegion *region);
|
|
int console_char_pick(SpaceConsole *sc, const ARegion *region, const int mval[2]);
|
|
|
|
void console_scrollback_prompt_begin(SpaceConsole *sc, ConsoleLine *cl_dummy);
|
|
void console_scrollback_prompt_end(SpaceConsole *sc, ConsoleLine *cl_dummy);
|
|
|
|
/* `console_ops.cc` */
|
|
|
|
void console_history_free(SpaceConsole *sc, ConsoleLine *cl);
|
|
void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl);
|
|
ConsoleLine *console_history_add_str(SpaceConsole *sc, char *str, bool own);
|
|
ConsoleLine *console_scrollback_add_str(SpaceConsole *sc, char *str, bool own);
|
|
|
|
ConsoleLine *console_history_verify(const bContext *C);
|
|
|
|
void console_textview_update_rect(SpaceConsole *sc, ARegion *region);
|
|
|
|
void CONSOLE_OT_move(wmOperatorType *ot);
|
|
void CONSOLE_OT_delete(wmOperatorType *ot);
|
|
void CONSOLE_OT_insert(wmOperatorType *ot);
|
|
|
|
void CONSOLE_OT_indent(wmOperatorType *ot);
|
|
void CONSOLE_OT_indent_or_autocomplete(wmOperatorType *ot);
|
|
void CONSOLE_OT_unindent(wmOperatorType *ot);
|
|
|
|
void CONSOLE_OT_history_append(wmOperatorType *ot);
|
|
void CONSOLE_OT_scrollback_append(wmOperatorType *ot);
|
|
|
|
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);
|
|
void CONSOLE_OT_select_all(wmOperatorType *ot);
|
|
void CONSOLE_OT_select_word(wmOperatorType *ot);
|
|
|
|
enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD };
|
|
enum {
|
|
DEL_NEXT_CHAR,
|
|
DEL_PREV_CHAR,
|
|
DEL_NEXT_WORD,
|
|
DEL_PREV_WORD,
|
|
DEL_SELECTION,
|
|
DEL_NEXT_SEL,
|
|
DEL_PREV_SEL
|
|
};
|