mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 07:40:42 +01:00
[python] Malloc the syntax-highlighting uPy heap
This commit is contained in:
committed by
EmilieNumworks
parent
29cacbc44f
commit
6cd18cca89
@@ -15,14 +15,19 @@ public:
|
||||
protected:
|
||||
class ContentView : public TextArea::ContentView {
|
||||
public:
|
||||
ContentView(KDText::FontSize fontSize) : TextArea::ContentView(fontSize) {}
|
||||
ContentView(KDText::FontSize fontSize);
|
||||
~ContentView();
|
||||
void clearRect(KDContext * ctx, KDRect rect) const override;
|
||||
void drawLine(KDContext * ctx, int line, const char * text, size_t length, int fromColumn, int toColumn) const override;
|
||||
KDRect dirtyRectFromCursorPosition(size_t index, bool lineBreak) const override;
|
||||
private:
|
||||
static constexpr size_t k_pythonHeapSize = 4096;
|
||||
char * m_pythonHeap;
|
||||
};
|
||||
private:
|
||||
const ContentView * nonEditableContentView() const override { return &m_contentView; }
|
||||
ContentView m_contentView;
|
||||
char * m_pythonHeap;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user