2019-05-04 18:14:48 +00:00
|
|
|
// Scintilla source code edit control
|
|
|
|
// ScintillaGTK.h - GTK+ specific subclass of ScintillaBase
|
|
|
|
// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>
|
|
|
|
// The License.txt file describes the conditions under which this software may be distributed.
|
|
|
|
|
|
|
|
#ifndef SCINTILLAGTK_H
|
|
|
|
#define SCINTILLAGTK_H
|
|
|
|
|
2022-01-04 23:07:50 +00:00
|
|
|
namespace Scintilla::Internal {
|
2019-05-04 18:14:48 +00:00
|
|
|
|
|
|
|
class ScintillaGTKAccessible;
|
|
|
|
|
|
|
|
#define OBJECT_CLASS GObjectClass
|
|
|
|
|
2022-01-04 23:07:50 +00:00
|
|
|
struct FontOptions {
|
|
|
|
cairo_antialias_t antialias {};
|
|
|
|
cairo_subpixel_order_t order {};
|
|
|
|
cairo_hint_style_t hint {};
|
|
|
|
FontOptions() noexcept = default;
|
|
|
|
explicit FontOptions(GtkWidget *widget) noexcept;
|
|
|
|
bool operator==(const FontOptions &other) const noexcept;
|
|
|
|
};
|
|
|
|
|
2019-05-04 18:14:48 +00:00
|
|
|
class ScintillaGTK : public ScintillaBase {
|
|
|
|
friend class ScintillaGTKAccessible;
|
|
|
|
|
|
|
|
_ScintillaObject *sci;
|
|
|
|
Window wText;
|
|
|
|
Window scrollbarv;
|
|
|
|
Window scrollbarh;
|
|
|
|
GtkAdjustment *adjustmentv;
|
|
|
|
GtkAdjustment *adjustmenth;
|
|
|
|
int verticalScrollBarWidth;
|
|
|
|
int horizontalScrollBarHeight;
|
|
|
|
|
|
|
|
SelectionText primary;
|
2022-01-04 23:07:50 +00:00
|
|
|
SelectionPosition posPrimary;
|
2019-05-04 18:14:48 +00:00
|
|
|
|
2022-01-04 23:07:50 +00:00
|
|
|
UniqueGdkEvent evbtn;
|
2019-05-04 18:14:48 +00:00
|
|
|
guint buttonMouse;
|
|
|
|
bool capturedMouse;
|
|
|
|
bool dragWasDropped;
|
|
|
|
int lastKey;
|
|
|
|
int rectangularSelectionModifier;
|
|
|
|
|
|
|
|
GtkWidgetClass *parentClass;
|
|
|
|
|
2021-02-21 04:53:09 +00:00
|
|
|
static inline GdkAtom atomUTF8 {};
|
|
|
|
static inline GdkAtom atomUTF8Mime {};
|
|
|
|
static inline GdkAtom atomString {};
|
|
|
|
static inline GdkAtom atomUriList {};
|
|
|
|
static inline GdkAtom atomDROPFILES_DND {};
|
2019-05-04 18:14:48 +00:00
|
|
|
GdkAtom atomSought;
|
2022-01-04 23:07:50 +00:00
|
|
|
size_t inClearSelection = 0;
|
2019-05-04 18:14:48 +00:00
|
|
|
|
|
|
|
#if PLAT_GTK_WIN32
|
|
|
|
CLIPFORMAT cfColumnSelect;
|
|
|
|
#endif
|
|
|
|
|
2021-02-21 04:53:09 +00:00
|
|
|
bool preeditInitialized;
|
2019-05-04 18:14:48 +00:00
|
|
|
Window wPreedit;
|
|
|
|
Window wPreeditDraw;
|
2022-01-04 23:07:50 +00:00
|
|
|
UniqueIMContext im_context;
|
2021-02-21 04:53:09 +00:00
|
|
|
GUnicodeScript lastNonCommonScript;
|
2019-05-04 18:14:48 +00:00
|
|
|
|
2022-01-04 23:07:50 +00:00
|
|
|
GtkSettings *settings;
|
|
|
|
gulong settingsHandlerId;
|
|
|
|
|
2019-05-04 18:14:48 +00:00
|
|
|
// Wheel mouse support
|
|
|
|
unsigned int linesPerScroll;
|
2021-02-21 04:53:09 +00:00
|
|
|
gint64 lastWheelMouseTime;
|
2019-05-04 18:14:48 +00:00
|
|
|
gint lastWheelMouseDirection;
|
|
|
|
gint wheelMouseIntensity;
|
|
|
|
gdouble smoothScrollY;
|
|
|
|
gdouble smoothScrollX;
|
|
|
|
|
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
cairo_rectangle_list_t *rgnUpdate;
|
|
|
|
#else
|
|
|
|
GdkRegion *rgnUpdate;
|
|
|
|
#endif
|
|
|
|
bool repaintFullWindow;
|
|
|
|
|
|
|
|
guint styleIdleID;
|
2022-05-25 20:16:39 +00:00
|
|
|
guint scrollBarIdleID = 0;
|
2022-01-04 23:07:50 +00:00
|
|
|
FontOptions fontOptionsPrevious;
|
2019-05-04 18:14:48 +00:00
|
|
|
int accessibilityEnabled;
|
|
|
|
AtkObject *accessible;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ScintillaGTK(_ScintillaObject *sci_);
|
|
|
|
// Deleted so ScintillaGTK objects can not be copied.
|
|
|
|
ScintillaGTK(const ScintillaGTK &) = delete;
|
|
|
|
ScintillaGTK(ScintillaGTK &&) = delete;
|
|
|
|
ScintillaGTK &operator=(const ScintillaGTK &) = delete;
|
|
|
|
ScintillaGTK &operator=(ScintillaGTK &&) = delete;
|
2022-01-04 23:07:50 +00:00
|
|
|
~ScintillaGTK() override;
|
2021-02-21 04:53:09 +00:00
|
|
|
static ScintillaGTK *FromWidget(GtkWidget *widget) noexcept;
|
2019-07-21 13:26:02 +00:00
|
|
|
static void ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class);
|
2019-05-04 18:14:48 +00:00
|
|
|
private:
|
|
|
|
void Init();
|
|
|
|
void Finalise() override;
|
|
|
|
bool AbandonPaint() override;
|
|
|
|
void DisplayCursor(Window::Cursor c) override;
|
|
|
|
bool DragThreshold(Point ptStart, Point ptNow) override;
|
|
|
|
void StartDrag() override;
|
|
|
|
Sci::Position TargetAsUTF8(char *text) const;
|
|
|
|
Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;
|
|
|
|
bool ValidCodePage(int codePage) const override;
|
2022-01-04 23:07:50 +00:00
|
|
|
std::string UTF8FromEncoded(std::string_view encoded) const override;
|
|
|
|
std::string EncodedFromUTF8(std::string_view utf8) const override;
|
2019-05-04 18:14:48 +00:00
|
|
|
public: // Public for scintilla_send_message
|
2022-01-04 23:07:50 +00:00
|
|
|
sptr_t WndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;
|
2019-05-04 18:14:48 +00:00
|
|
|
private:
|
2022-01-04 23:07:50 +00:00
|
|
|
sptr_t DefWndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;
|
2019-05-04 18:14:48 +00:00
|
|
|
struct TimeThunk {
|
|
|
|
TickReason reason;
|
|
|
|
ScintillaGTK *scintilla;
|
|
|
|
guint timer;
|
2022-01-04 23:07:50 +00:00
|
|
|
TimeThunk() noexcept : reason(TickReason::caret), scintilla(nullptr), timer(0) {}
|
2019-05-04 18:14:48 +00:00
|
|
|
};
|
2022-01-04 23:07:50 +00:00
|
|
|
TimeThunk timers[static_cast<size_t>(TickReason::dwell)+1];
|
2019-05-04 18:14:48 +00:00
|
|
|
bool FineTickerRunning(TickReason reason) override;
|
|
|
|
void FineTickerStart(TickReason reason, int millis, int tolerance) override;
|
|
|
|
void FineTickerCancel(TickReason reason) override;
|
|
|
|
bool SetIdle(bool on) override;
|
|
|
|
void SetMouseCapture(bool on) override;
|
|
|
|
bool HaveMouseCapture() override;
|
|
|
|
bool PaintContains(PRectangle rc) override;
|
|
|
|
void FullPaint();
|
|
|
|
PRectangle GetClientRectangle() const override;
|
|
|
|
void ScrollText(Sci::Line linesToMove) override;
|
|
|
|
void SetVerticalScrollPos() override;
|
|
|
|
void SetHorizontalScrollPos() override;
|
|
|
|
bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;
|
|
|
|
void ReconfigureScrollBars() override;
|
2022-05-25 20:16:39 +00:00
|
|
|
void SetScrollBars() override;
|
2019-05-04 18:14:48 +00:00
|
|
|
void NotifyChange() override;
|
|
|
|
void NotifyFocus(bool focus) override;
|
2022-01-04 23:07:50 +00:00
|
|
|
void NotifyParent(Scintilla::NotificationData scn) override;
|
|
|
|
void NotifyKey(Scintilla::Keys key, Scintilla::KeyMod modifiers);
|
2019-05-04 18:14:48 +00:00
|
|
|
void NotifyURIDropped(const char *list);
|
|
|
|
const char *CharacterSetID() const;
|
2022-01-04 23:07:50 +00:00
|
|
|
std::unique_ptr<CaseFolder> CaseFolderForEncoding() override;
|
|
|
|
std::string CaseMapString(const std::string &s, CaseMapping caseMapping) override;
|
|
|
|
int KeyDefault(Scintilla::Keys key, Scintilla::KeyMod modifiers) override;
|
2019-05-04 18:14:48 +00:00
|
|
|
void CopyToClipboard(const SelectionText &selectedText) override;
|
|
|
|
void Copy() override;
|
2019-07-21 13:26:02 +00:00
|
|
|
void RequestSelection(GdkAtom atomSelection);
|
2019-05-04 18:14:48 +00:00
|
|
|
void Paste() override;
|
|
|
|
void CreateCallTipWindow(PRectangle rc) override;
|
|
|
|
void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;
|
|
|
|
bool OwnPrimarySelection();
|
|
|
|
void ClaimSelection() override;
|
2021-02-21 04:53:09 +00:00
|
|
|
static bool IsStringAtom(GdkAtom type);
|
2019-05-04 18:14:48 +00:00
|
|
|
void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText);
|
2021-02-21 04:53:09 +00:00
|
|
|
void InsertSelection(GtkClipboard *clipBoard, GtkSelectionData *selectionData);
|
2019-07-21 13:26:02 +00:00
|
|
|
public: // Public for SelectionReceiver
|
|
|
|
GObject *MainObject() const noexcept;
|
2021-02-21 04:53:09 +00:00
|
|
|
void ReceivedClipboard(GtkClipboard *clipBoard, GtkSelectionData *selection_data) noexcept;
|
2019-07-21 13:26:02 +00:00
|
|
|
private:
|
2019-05-04 18:14:48 +00:00
|
|
|
void ReceivedSelection(GtkSelectionData *selection_data);
|
|
|
|
void ReceivedDrop(GtkSelectionData *selection_data);
|
|
|
|
static void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text);
|
|
|
|
void StoreOnClipboard(SelectionText *clipText);
|
2019-07-21 13:26:02 +00:00
|
|
|
static void ClipboardGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, void *data);
|
|
|
|
static void ClipboardClearSelection(GtkClipboard *clip, void *data);
|
2019-05-04 18:14:48 +00:00
|
|
|
|
2022-01-04 23:07:50 +00:00
|
|
|
void ClearPrimarySelection();
|
|
|
|
void PrimaryGetSelectionThis(GtkClipboard *clip, GtkSelectionData *selection_data, guint info);
|
|
|
|
static void PrimaryGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, gpointer pSci);
|
|
|
|
void PrimaryClearSelectionThis(GtkClipboard *clip);
|
|
|
|
static void PrimaryClearSelection(GtkClipboard *clip, gpointer pSci);
|
|
|
|
|
2019-05-04 18:14:48 +00:00
|
|
|
void UnclaimSelection(GdkEventSelection *selection_event);
|
|
|
|
void Resize(int width, int height);
|
|
|
|
|
|
|
|
// Callback functions
|
|
|
|
void RealizeThis(GtkWidget *widget);
|
|
|
|
static void Realize(GtkWidget *widget);
|
|
|
|
void UnRealizeThis(GtkWidget *widget);
|
|
|
|
static void UnRealize(GtkWidget *widget);
|
|
|
|
void MapThis();
|
|
|
|
static void Map(GtkWidget *widget);
|
|
|
|
void UnMapThis();
|
|
|
|
static void UnMap(GtkWidget *widget);
|
|
|
|
gint FocusInThis(GtkWidget *widget);
|
|
|
|
static gint FocusIn(GtkWidget *widget, GdkEventFocus *event);
|
|
|
|
gint FocusOutThis(GtkWidget *widget);
|
|
|
|
static gint FocusOut(GtkWidget *widget, GdkEventFocus *event);
|
|
|
|
static void SizeRequest(GtkWidget *widget, GtkRequisition *requisition);
|
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
static void GetPreferredWidth(GtkWidget *widget, gint *minimalWidth, gint *naturalWidth);
|
|
|
|
static void GetPreferredHeight(GtkWidget *widget, gint *minimalHeight, gint *naturalHeight);
|
|
|
|
#endif
|
|
|
|
static void SizeAllocate(GtkWidget *widget, GtkAllocation *allocation);
|
2022-01-04 23:07:50 +00:00
|
|
|
void CheckForFontOptionChange();
|
2019-05-04 18:14:48 +00:00
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
gboolean DrawTextThis(cairo_t *cr);
|
|
|
|
static gboolean DrawText(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis);
|
|
|
|
gboolean DrawThis(cairo_t *cr);
|
|
|
|
static gboolean DrawMain(GtkWidget *widget, cairo_t *cr);
|
|
|
|
#else
|
|
|
|
gboolean ExposeTextThis(GtkWidget *widget, GdkEventExpose *ose);
|
|
|
|
static gboolean ExposeText(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis);
|
|
|
|
gboolean Expose(GtkWidget *widget, GdkEventExpose *ose);
|
|
|
|
static gboolean ExposeMain(GtkWidget *widget, GdkEventExpose *ose);
|
|
|
|
#endif
|
|
|
|
void ForAll(GtkCallback callback, gpointer callback_data);
|
|
|
|
static void MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
|
|
|
|
|
|
|
|
static void ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);
|
|
|
|
static void ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);
|
|
|
|
gint PressThis(GdkEventButton *event);
|
|
|
|
static gint Press(GtkWidget *widget, GdkEventButton *event);
|
|
|
|
static gint MouseRelease(GtkWidget *widget, GdkEventButton *event);
|
|
|
|
static gint ScrollEvent(GtkWidget *widget, GdkEventScroll *event);
|
|
|
|
static gint Motion(GtkWidget *widget, GdkEventMotion *event);
|
|
|
|
gboolean KeyThis(GdkEventKey *event);
|
|
|
|
static gboolean KeyPress(GtkWidget *widget, GdkEventKey *event);
|
|
|
|
static gboolean KeyRelease(GtkWidget *widget, GdkEventKey *event);
|
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
gboolean DrawPreeditThis(GtkWidget *widget, cairo_t *cr);
|
|
|
|
static gboolean DrawPreedit(GtkWidget *widget, cairo_t *cr, ScintillaGTK *sciThis);
|
|
|
|
#else
|
|
|
|
gboolean ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose);
|
|
|
|
static gboolean ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, ScintillaGTK *sciThis);
|
|
|
|
#endif
|
2019-07-21 13:26:02 +00:00
|
|
|
AtkObject *GetAccessibleThis(GtkWidget *widget);
|
|
|
|
static AtkObject *GetAccessible(GtkWidget *widget);
|
2019-05-04 18:14:48 +00:00
|
|
|
|
|
|
|
bool KoreanIME();
|
|
|
|
void CommitThis(char *commitStr);
|
|
|
|
static void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis);
|
|
|
|
void PreeditChangedInlineThis();
|
|
|
|
void PreeditChangedWindowedThis();
|
|
|
|
static void PreeditChanged(GtkIMContext *context, ScintillaGTK *sciThis);
|
2023-02-09 16:57:24 +00:00
|
|
|
bool RetrieveSurroundingThis(GtkIMContext *context);
|
|
|
|
static gboolean RetrieveSurrounding(GtkIMContext *context, ScintillaGTK *sciThis);
|
|
|
|
bool DeleteSurroundingThis(GtkIMContext *context, gint characterOffset, gint characterCount);
|
|
|
|
static gboolean DeleteSurrounding(GtkIMContext *context, gint characterOffset, gint characterCount,
|
|
|
|
ScintillaGTK *sciThis);
|
2022-01-04 23:07:50 +00:00
|
|
|
void MoveImeCarets(Sci::Position pos);
|
|
|
|
void DrawImeIndicator(int indicator, Sci::Position len);
|
2019-05-04 18:14:48 +00:00
|
|
|
void SetCandidateWindowPos();
|
|
|
|
|
2019-07-21 13:26:02 +00:00
|
|
|
static void StyleSetText(GtkWidget *widget, GtkStyle *previous, void *);
|
|
|
|
static void RealizeText(GtkWidget *widget, void *);
|
2019-05-04 18:14:48 +00:00
|
|
|
static void Dispose(GObject *object);
|
|
|
|
static void Destroy(GObject *object);
|
|
|
|
static void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data,
|
2019-07-21 13:26:02 +00:00
|
|
|
guint time);
|
2019-05-04 18:14:48 +00:00
|
|
|
static void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data,
|
2019-07-21 13:26:02 +00:00
|
|
|
guint info, guint time);
|
2019-05-04 18:14:48 +00:00
|
|
|
static gint SelectionClear(GtkWidget *widget, GdkEventSelection *selection_event);
|
|
|
|
gboolean DragMotionThis(GdkDragContext *context, gint x, gint y, guint dragtime);
|
|
|
|
static gboolean DragMotion(GtkWidget *widget, GdkDragContext *context,
|
2019-07-21 13:26:02 +00:00
|
|
|
gint x, gint y, guint dragtime);
|
2019-05-04 18:14:48 +00:00
|
|
|
static void DragLeave(GtkWidget *widget, GdkDragContext *context,
|
2019-07-21 13:26:02 +00:00
|
|
|
guint time);
|
2019-05-04 18:14:48 +00:00
|
|
|
static void DragEnd(GtkWidget *widget, GdkDragContext *context);
|
|
|
|
static gboolean Drop(GtkWidget *widget, GdkDragContext *context,
|
2019-07-21 13:26:02 +00:00
|
|
|
gint x, gint y, guint time);
|
2019-05-04 18:14:48 +00:00
|
|
|
static void DragDataReceived(GtkWidget *widget, GdkDragContext *context,
|
2019-07-21 13:26:02 +00:00
|
|
|
gint x, gint y, GtkSelectionData *selection_data, guint info, guint time);
|
2019-05-04 18:14:48 +00:00
|
|
|
static void DragDataGet(GtkWidget *widget, GdkDragContext *context,
|
2019-07-21 13:26:02 +00:00
|
|
|
GtkSelectionData *selection_data, guint info, guint time);
|
2019-05-04 18:14:48 +00:00
|
|
|
static gboolean TimeOut(gpointer ptt);
|
|
|
|
static gboolean IdleCallback(gpointer pSci);
|
|
|
|
static gboolean StyleIdle(gpointer pSci);
|
|
|
|
void IdleWork() override;
|
2022-01-04 23:07:50 +00:00
|
|
|
void QueueIdleWork(WorkItems items, Sci::Position upTo) override;
|
2019-05-04 18:14:48 +00:00
|
|
|
void SetDocPointer(Document *document) override;
|
|
|
|
static void PopUpCB(GtkMenuItem *menuItem, ScintillaGTK *sciThis);
|
|
|
|
|
|
|
|
#if GTK_CHECK_VERSION(3,0,0)
|
|
|
|
static gboolean DrawCT(GtkWidget *widget, cairo_t *cr, CallTip *ctip);
|
|
|
|
#else
|
|
|
|
static gboolean ExposeCT(GtkWidget *widget, GdkEventExpose *ose, CallTip *ctip);
|
|
|
|
#endif
|
|
|
|
static gboolean PressCT(GtkWidget *widget, GdkEventButton *event, ScintillaGTK *sciThis);
|
|
|
|
|
|
|
|
static sptr_t DirectFunction(sptr_t ptr,
|
2019-07-21 13:26:02 +00:00
|
|
|
unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
2022-01-04 23:07:50 +00:00
|
|
|
static sptr_t DirectStatusFunction(sptr_t ptr,
|
|
|
|
unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);
|
2019-05-04 18:14:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// helper class to watch a GObject lifetime and get notified when it dies
|
|
|
|
class GObjectWatcher {
|
|
|
|
GObject *weakRef;
|
|
|
|
|
|
|
|
void WeakNotifyThis(GObject *obj G_GNUC_UNUSED) {
|
|
|
|
PLATFORM_ASSERT(obj == weakRef);
|
|
|
|
|
|
|
|
Destroyed();
|
2019-07-21 13:26:02 +00:00
|
|
|
weakRef = nullptr;
|
2019-05-04 18:14:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void WeakNotify(gpointer data, GObject *obj) {
|
2019-07-21 13:26:02 +00:00
|
|
|
static_cast<GObjectWatcher *>(data)->WeakNotifyThis(obj);
|
2019-05-04 18:14:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
GObjectWatcher(GObject *obj) :
|
2019-07-21 13:26:02 +00:00
|
|
|
weakRef(obj) {
|
2019-05-04 18:14:48 +00:00
|
|
|
g_object_weak_ref(weakRef, WeakNotify, this);
|
|
|
|
}
|
|
|
|
|
2021-02-21 04:53:09 +00:00
|
|
|
// Deleted so GObjectWatcher objects can not be copied.
|
|
|
|
GObjectWatcher(const GObjectWatcher&) = delete;
|
|
|
|
GObjectWatcher(GObjectWatcher&&) = delete;
|
|
|
|
GObjectWatcher&operator=(const GObjectWatcher&) = delete;
|
|
|
|
GObjectWatcher&operator=(GObjectWatcher&&) = delete;
|
|
|
|
|
2019-05-04 18:14:48 +00:00
|
|
|
virtual ~GObjectWatcher() {
|
|
|
|
if (weakRef) {
|
|
|
|
g_object_weak_unref(weakRef, WeakNotify, this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Destroyed() {}
|
|
|
|
|
|
|
|
bool IsDestroyed() const {
|
2019-07-21 13:26:02 +00:00
|
|
|
return weakRef != nullptr;
|
2019-05-04 18:14:48 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
std::string ConvertText(const char *s, size_t len, const char *charSetDest,
|
2019-07-21 13:26:02 +00:00
|
|
|
const char *charSetSource, bool transliterations, bool silent=false);
|
2019-05-04 18:14:48 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|