play around with Scintilla and Lexilla
This commit is contained in:
72
3rdparty/scintilla550/scintilla/gtk/Converter.h
vendored
Normal file
72
3rdparty/scintilla550/scintilla/gtk/Converter.h
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
// Scintilla source code edit control
|
||||
// Converter.h - Encapsulation of iconv
|
||||
// Copyright 2004 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef CONVERTER_H
|
||||
#define CONVERTER_H
|
||||
|
||||
namespace Scintilla {
|
||||
|
||||
const GIConv iconvhBad = (GIConv)(-1);
|
||||
const gsize sizeFailure = static_cast<gsize>(-1);
|
||||
/**
|
||||
* Encapsulate g_iconv safely.
|
||||
*/
|
||||
class Converter {
|
||||
GIConv iconvh = iconvhBad;
|
||||
void OpenHandle(const char *fullDestination, const char *charSetSource) noexcept {
|
||||
iconvh = g_iconv_open(fullDestination, charSetSource);
|
||||
}
|
||||
bool Succeeded() const noexcept {
|
||||
return iconvh != iconvhBad;
|
||||
}
|
||||
public:
|
||||
Converter() noexcept = default;
|
||||
Converter(const char *charSetDestination, const char *charSetSource, bool transliterations) {
|
||||
Open(charSetDestination, charSetSource, transliterations);
|
||||
}
|
||||
// Deleted so Converter objects can not be copied.
|
||||
Converter(const Converter &) = delete;
|
||||
Converter(Converter &&) = delete;
|
||||
Converter &operator=(const Converter &) = delete;
|
||||
Converter &operator=(Converter &&) = delete;
|
||||
~Converter() {
|
||||
Close();
|
||||
}
|
||||
operator bool() const noexcept {
|
||||
return Succeeded();
|
||||
}
|
||||
void Open(const char *charSetDestination, const char *charSetSource, bool transliterations) {
|
||||
Close();
|
||||
if (*charSetSource) {
|
||||
// Try allowing approximate transliterations
|
||||
if (transliterations) {
|
||||
std::string fullDest(charSetDestination);
|
||||
fullDest.append("//TRANSLIT");
|
||||
OpenHandle(fullDest.c_str(), charSetSource);
|
||||
}
|
||||
if (!Succeeded()) {
|
||||
// Transliterations failed so try basic name
|
||||
OpenHandle(charSetDestination, charSetSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
void Close() noexcept {
|
||||
if (Succeeded()) {
|
||||
g_iconv_close(iconvh);
|
||||
iconvh = iconvhBad;
|
||||
}
|
||||
}
|
||||
gsize Convert(char **src, gsize *srcleft, char **dst, gsize *dstleft) const noexcept {
|
||||
if (!Succeeded()) {
|
||||
return sizeFailure;
|
||||
} else {
|
||||
return g_iconv(iconvh, src, srcleft, dst, dstleft);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
23
3rdparty/scintilla550/scintilla/gtk/DepGen.py
vendored
Normal file
23
3rdparty/scintilla550/scintilla/gtk/DepGen.py
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# DepGen.py - produce a make dependencies file for Scintilla
|
||||
# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# Requires Python 3.6 or later
|
||||
|
||||
import sys
|
||||
|
||||
sys.path.append("..")
|
||||
|
||||
from scripts import Dependencies
|
||||
|
||||
topComment = "# Created by DepGen.py. To recreate, run DepGen.py.\n"
|
||||
|
||||
def Generate():
|
||||
sources = ["../src/*.cxx"]
|
||||
includes = ["../include", "../src"]
|
||||
|
||||
deps = Dependencies.FindDependencies(["../gtk/*.cxx"] + sources, ["../gtk"] + includes, ".o", "../gtk/")
|
||||
Dependencies.UpdateDependencies("../gtk/deps.mak", deps, topComment)
|
||||
|
||||
if __name__ == "__main__":
|
||||
Generate()
|
2237
3rdparty/scintilla550/scintilla/gtk/PlatGTK.cxx
vendored
Normal file
2237
3rdparty/scintilla550/scintilla/gtk/PlatGTK.cxx
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3395
3rdparty/scintilla550/scintilla/gtk/ScintillaGTK.cxx
vendored
Normal file
3395
3rdparty/scintilla550/scintilla/gtk/ScintillaGTK.cxx
vendored
Normal file
File diff suppressed because it is too large
Load Diff
337
3rdparty/scintilla550/scintilla/gtk/ScintillaGTK.h
vendored
Normal file
337
3rdparty/scintilla550/scintilla/gtk/ScintillaGTK.h
vendored
Normal file
@ -0,0 +1,337 @@
|
||||
// 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
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
class ScintillaGTKAccessible;
|
||||
|
||||
#define OBJECT_CLASS GObjectClass
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
class ScintillaGTK : public ScintillaBase {
|
||||
friend class ScintillaGTKAccessible;
|
||||
|
||||
_ScintillaObject *sci;
|
||||
Window wText;
|
||||
Window scrollbarv;
|
||||
Window scrollbarh;
|
||||
GtkAdjustment *adjustmentv;
|
||||
GtkAdjustment *adjustmenth;
|
||||
int verticalScrollBarWidth;
|
||||
int horizontalScrollBarHeight;
|
||||
|
||||
PRectangle rectangleClient;
|
||||
|
||||
SelectionText primary;
|
||||
SelectionPosition posPrimary;
|
||||
|
||||
UniqueGdkEvent evbtn;
|
||||
guint buttonMouse;
|
||||
bool capturedMouse;
|
||||
bool dragWasDropped;
|
||||
int lastKey;
|
||||
int rectangularSelectionModifier;
|
||||
|
||||
GtkWidgetClass *parentClass;
|
||||
|
||||
static inline GdkAtom atomUTF8 {};
|
||||
static inline GdkAtom atomUTF8Mime {};
|
||||
static inline GdkAtom atomString {};
|
||||
static inline GdkAtom atomUriList {};
|
||||
static inline GdkAtom atomDROPFILES_DND {};
|
||||
GdkAtom atomSought;
|
||||
size_t inClearSelection = 0;
|
||||
|
||||
#if PLAT_GTK_WIN32
|
||||
CLIPFORMAT cfColumnSelect;
|
||||
#endif
|
||||
|
||||
bool preeditInitialized;
|
||||
Window wPreedit;
|
||||
Window wPreeditDraw;
|
||||
UniqueIMContext im_context;
|
||||
GUnicodeScript lastNonCommonScript;
|
||||
|
||||
GtkSettings *settings;
|
||||
gulong settingsHandlerId;
|
||||
|
||||
// Wheel mouse support
|
||||
unsigned int linesPerScroll;
|
||||
gint64 lastWheelMouseTime;
|
||||
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;
|
||||
guint scrollBarIdleID = 0;
|
||||
FontOptions fontOptionsPrevious;
|
||||
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;
|
||||
~ScintillaGTK() override;
|
||||
static ScintillaGTK *FromWidget(GtkWidget *widget) noexcept;
|
||||
static void ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class);
|
||||
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;
|
||||
std::string UTF8FromEncoded(std::string_view encoded) const override;
|
||||
std::string EncodedFromUTF8(std::string_view utf8) const override;
|
||||
public: // Public for scintilla_send_message
|
||||
sptr_t WndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;
|
||||
private:
|
||||
sptr_t DefWndProc(Scintilla::Message iMessage, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) override;
|
||||
struct TimeThunk {
|
||||
TickReason reason;
|
||||
ScintillaGTK *scintilla;
|
||||
guint timer;
|
||||
TimeThunk() noexcept : reason(TickReason::caret), scintilla(nullptr), timer(0) {}
|
||||
};
|
||||
TimeThunk timers[static_cast<size_t>(TickReason::dwell)+1];
|
||||
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();
|
||||
void SetClientRectangle();
|
||||
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;
|
||||
void SetScrollBars() override;
|
||||
void NotifyChange() override;
|
||||
void NotifyFocus(bool focus) override;
|
||||
void NotifyParent(Scintilla::NotificationData scn) override;
|
||||
void NotifyKey(Scintilla::Keys key, Scintilla::KeyMod modifiers);
|
||||
void NotifyURIDropped(const char *list);
|
||||
const char *CharacterSetID() const;
|
||||
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;
|
||||
void CopyToClipboard(const SelectionText &selectedText) override;
|
||||
void Copy() override;
|
||||
void RequestSelection(GdkAtom atomSelection);
|
||||
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;
|
||||
static bool IsStringAtom(GdkAtom type);
|
||||
void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText);
|
||||
void InsertSelection(GtkClipboard *clipBoard, GtkSelectionData *selectionData);
|
||||
public: // Public for SelectionReceiver
|
||||
GObject *MainObject() const noexcept;
|
||||
void ReceivedClipboard(GtkClipboard *clipBoard, GtkSelectionData *selection_data) noexcept;
|
||||
private:
|
||||
void ReceivedSelection(GtkSelectionData *selection_data);
|
||||
void ReceivedDrop(GtkSelectionData *selection_data);
|
||||
static void GetSelection(GtkSelectionData *selection_data, guint info, SelectionText *text);
|
||||
void StoreOnClipboard(SelectionText *clipText);
|
||||
static void ClipboardGetSelection(GtkClipboard *clip, GtkSelectionData *selection_data, guint info, void *data);
|
||||
static void ClipboardClearSelection(GtkClipboard *clip, void *data);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
void CheckForFontOptionChange();
|
||||
#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
|
||||
AtkObject *GetAccessibleThis(GtkWidget *widget);
|
||||
static AtkObject *GetAccessible(GtkWidget *widget);
|
||||
|
||||
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);
|
||||
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);
|
||||
void MoveImeCarets(Sci::Position pos);
|
||||
void DrawImeIndicator(int indicator, Sci::Position len);
|
||||
void SetCandidateWindowPos();
|
||||
|
||||
static void StyleSetText(GtkWidget *widget, GtkStyle *previous, void *);
|
||||
static void RealizeText(GtkWidget *widget, void *);
|
||||
static void Dispose(GObject *object);
|
||||
static void Destroy(GObject *object);
|
||||
static void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data,
|
||||
guint time);
|
||||
static void SelectionGet(GtkWidget *widget, GtkSelectionData *selection_data,
|
||||
guint info, guint time);
|
||||
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,
|
||||
gint x, gint y, guint dragtime);
|
||||
static void DragLeave(GtkWidget *widget, GdkDragContext *context,
|
||||
guint time);
|
||||
static void DragEnd(GtkWidget *widget, GdkDragContext *context);
|
||||
static gboolean Drop(GtkWidget *widget, GdkDragContext *context,
|
||||
gint x, gint y, guint time);
|
||||
static void DragDataReceived(GtkWidget *widget, GdkDragContext *context,
|
||||
gint x, gint y, GtkSelectionData *selection_data, guint info, guint time);
|
||||
static void DragDataGet(GtkWidget *widget, GdkDragContext *context,
|
||||
GtkSelectionData *selection_data, guint info, guint time);
|
||||
static gboolean TimeOut(gpointer ptt);
|
||||
static gboolean IdleCallback(gpointer pSci);
|
||||
static gboolean StyleIdle(gpointer pSci);
|
||||
void IdleWork() override;
|
||||
void QueueIdleWork(WorkItems items, Sci::Position upTo) override;
|
||||
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,
|
||||
unsigned int iMessage, uptr_t wParam, sptr_t lParam);
|
||||
static sptr_t DirectStatusFunction(sptr_t ptr,
|
||||
unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);
|
||||
};
|
||||
|
||||
// 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();
|
||||
weakRef = nullptr;
|
||||
}
|
||||
|
||||
static void WeakNotify(gpointer data, GObject *obj) {
|
||||
static_cast<GObjectWatcher *>(data)->WeakNotifyThis(obj);
|
||||
}
|
||||
|
||||
public:
|
||||
GObjectWatcher(GObject *obj) :
|
||||
weakRef(obj) {
|
||||
g_object_weak_ref(weakRef, WeakNotify, this);
|
||||
}
|
||||
|
||||
// Deleted so GObjectWatcher objects can not be copied.
|
||||
GObjectWatcher(const GObjectWatcher&) = delete;
|
||||
GObjectWatcher(GObjectWatcher&&) = delete;
|
||||
GObjectWatcher&operator=(const GObjectWatcher&) = delete;
|
||||
GObjectWatcher&operator=(GObjectWatcher&&) = delete;
|
||||
|
||||
virtual ~GObjectWatcher() {
|
||||
if (weakRef) {
|
||||
g_object_weak_unref(weakRef, WeakNotify, this);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Destroyed() {}
|
||||
|
||||
bool IsDestroyed() const {
|
||||
return weakRef != nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
std::string ConvertText(const char *s, size_t len, const char *charSetDest,
|
||||
const char *charSetSource, bool transliterations, bool silent=false);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
1264
3rdparty/scintilla550/scintilla/gtk/ScintillaGTKAccessible.cxx
vendored
Normal file
1264
3rdparty/scintilla550/scintilla/gtk/ScintillaGTKAccessible.cxx
vendored
Normal file
File diff suppressed because it is too large
Load Diff
194
3rdparty/scintilla550/scintilla/gtk/ScintillaGTKAccessible.h
vendored
Normal file
194
3rdparty/scintilla550/scintilla/gtk/ScintillaGTKAccessible.h
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
/* Scintilla source code edit control */
|
||||
/* ScintillaGTKAccessible.h - GTK+ accessibility for ScintillaGTK */
|
||||
/* Copyright 2016 by Colomban Wendling <colomban@geany.org>
|
||||
* The License.txt file describes the conditions under which this software may be distributed. */
|
||||
|
||||
#ifndef SCINTILLAGTKACCESSIBLE_H
|
||||
#define SCINTILLAGTKACCESSIBLE_H
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
#ifndef ATK_CHECK_VERSION
|
||||
# define ATK_CHECK_VERSION(x, y, z) 0
|
||||
#endif
|
||||
|
||||
class ScintillaGTKAccessible {
|
||||
private:
|
||||
// weak references to related objects
|
||||
GtkAccessible *accessible;
|
||||
ScintillaGTK *sci;
|
||||
|
||||
// local state for comparing
|
||||
Sci::Position old_pos;
|
||||
std::vector<SelectionRange> old_sels;
|
||||
|
||||
bool Enabled() const;
|
||||
void UpdateCursor();
|
||||
void Notify(GtkWidget *widget, gint code, Scintilla::NotificationData *nt);
|
||||
static void SciNotify(GtkWidget *widget, gint code, Scintilla::NotificationData *nt, gpointer data) {
|
||||
try {
|
||||
static_cast<ScintillaGTKAccessible*>(data)->Notify(widget, code, nt);
|
||||
} catch (...) {}
|
||||
}
|
||||
|
||||
Sci::Position ByteOffsetFromCharacterOffset(Sci::Position startByte, int characterOffset) {
|
||||
if (!FlagSet(sci->pdoc->LineCharacterIndex(), Scintilla::LineCharacterIndexType::Utf32)) {
|
||||
return startByte + characterOffset;
|
||||
}
|
||||
if (characterOffset > 0) {
|
||||
// Try and reduce the range by reverse-looking into the character offset cache
|
||||
Sci::Line lineStart = sci->pdoc->LineFromPosition(startByte);
|
||||
Sci::Position posStart = sci->pdoc->IndexLineStart(lineStart, Scintilla::LineCharacterIndexType::Utf32);
|
||||
Sci::Line line = sci->pdoc->LineFromPositionIndex(posStart + characterOffset, Scintilla::LineCharacterIndexType::Utf32);
|
||||
if (line != lineStart) {
|
||||
startByte += sci->pdoc->LineStart(line) - sci->pdoc->LineStart(lineStart);
|
||||
characterOffset -= sci->pdoc->IndexLineStart(line, Scintilla::LineCharacterIndexType::Utf32) - posStart;
|
||||
}
|
||||
}
|
||||
Sci::Position pos = sci->pdoc->GetRelativePosition(startByte, characterOffset);
|
||||
if (pos == INVALID_POSITION) {
|
||||
// clamp invalid positions inside the document
|
||||
if (characterOffset > 0) {
|
||||
return sci->pdoc->Length();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
Sci::Position ByteOffsetFromCharacterOffset(Sci::Position characterOffset) {
|
||||
return ByteOffsetFromCharacterOffset(0, characterOffset);
|
||||
}
|
||||
|
||||
Sci::Position CharacterOffsetFromByteOffset(Sci::Position byteOffset) {
|
||||
if (!FlagSet(sci->pdoc->LineCharacterIndex(), Scintilla::LineCharacterIndexType::Utf32)) {
|
||||
return byteOffset;
|
||||
}
|
||||
const Sci::Line line = sci->pdoc->LineFromPosition(byteOffset);
|
||||
const Sci::Position lineStart = sci->pdoc->LineStart(line);
|
||||
return sci->pdoc->IndexLineStart(line, Scintilla::LineCharacterIndexType::Utf32) + sci->pdoc->CountCharacters(lineStart, byteOffset);
|
||||
}
|
||||
|
||||
void CharacterRangeFromByteRange(Sci::Position startByte, Sci::Position endByte, int *startChar, int *endChar) {
|
||||
*startChar = CharacterOffsetFromByteOffset(startByte);
|
||||
*endChar = *startChar + sci->pdoc->CountCharacters(startByte, endByte);
|
||||
}
|
||||
|
||||
void ByteRangeFromCharacterRange(int startChar, int endChar, Sci::Position& startByte, Sci::Position& endByte) {
|
||||
startByte = ByteOffsetFromCharacterOffset(startChar);
|
||||
endByte = ByteOffsetFromCharacterOffset(startByte, endChar - startChar);
|
||||
}
|
||||
|
||||
Sci::Position PositionBefore(Sci::Position pos) {
|
||||
return sci->pdoc->MovePositionOutsideChar(pos - 1, -1, true);
|
||||
}
|
||||
|
||||
Sci::Position PositionAfter(Sci::Position pos) {
|
||||
return sci->pdoc->MovePositionOutsideChar(pos + 1, 1, true);
|
||||
}
|
||||
|
||||
int StyleAt(Sci::Position position, bool ensureStyle = false) {
|
||||
if (ensureStyle)
|
||||
sci->pdoc->EnsureStyledTo(position);
|
||||
return sci->pdoc->StyleAt(position);
|
||||
}
|
||||
|
||||
// For AtkText
|
||||
gchar *GetTextRangeUTF8(Sci::Position startByte, Sci::Position endByte);
|
||||
gchar *GetText(int startChar, int endChar);
|
||||
gchar *GetTextAfterOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);
|
||||
gchar *GetTextBeforeOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);
|
||||
gchar *GetTextAtOffset(int charOffset, AtkTextBoundary boundaryType, int *startChar, int *endChar);
|
||||
#if ATK_CHECK_VERSION(2, 10, 0)
|
||||
gchar *GetStringAtOffset(int charOffset, AtkTextGranularity granularity, int *startChar, int *endChar);
|
||||
#endif
|
||||
gunichar GetCharacterAtOffset(int charOffset);
|
||||
gint GetCharacterCount();
|
||||
gint GetCaretOffset();
|
||||
gboolean SetCaretOffset(int charOffset);
|
||||
gint GetOffsetAtPoint(gint x, gint y, AtkCoordType coords);
|
||||
void GetCharacterExtents(int charOffset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords);
|
||||
AtkAttributeSet *GetAttributesForStyle(unsigned int styleNum);
|
||||
AtkAttributeSet *GetRunAttributes(int charOffset, int *startChar, int *endChar);
|
||||
AtkAttributeSet *GetDefaultAttributes();
|
||||
gint GetNSelections();
|
||||
gchar *GetSelection(gint selection_num, int *startChar, int *endChar);
|
||||
gboolean AddSelection(int startChar, int endChar);
|
||||
gboolean RemoveSelection(int selection_num);
|
||||
gboolean SetSelection(gint selection_num, int startChar, int endChar);
|
||||
// for AtkEditableText
|
||||
bool InsertStringUTF8(Sci::Position bytePos, const gchar *utf8, Sci::Position lengthBytes);
|
||||
void SetTextContents(const gchar *contents);
|
||||
void InsertText(const gchar *text, int lengthBytes, int *charPosition);
|
||||
void CopyText(int startChar, int endChar);
|
||||
void CutText(int startChar, int endChar);
|
||||
void DeleteText(int startChar, int endChar);
|
||||
void PasteText(int charPosition);
|
||||
|
||||
public:
|
||||
ScintillaGTKAccessible(GtkAccessible *accessible_, GtkWidget *widget_);
|
||||
~ScintillaGTKAccessible();
|
||||
|
||||
static ScintillaGTKAccessible *FromAccessible(GtkAccessible *accessible);
|
||||
static ScintillaGTKAccessible *FromAccessible(AtkObject *accessible) {
|
||||
return FromAccessible(GTK_ACCESSIBLE(accessible));
|
||||
}
|
||||
// So ScintillaGTK can notify us
|
||||
void ChangeDocument(Document *oldDoc, Document *newDoc);
|
||||
void NotifyReadOnly();
|
||||
void SetAccessibility(bool enabled);
|
||||
|
||||
// Helper GtkWidget methods
|
||||
static AtkObject *WidgetGetAccessibleImpl(GtkWidget *widget, AtkObject **cache, gpointer widget_parent_class);
|
||||
|
||||
// ATK methods
|
||||
|
||||
class AtkTextIface {
|
||||
public:
|
||||
static void init(::AtkTextIface *iface);
|
||||
|
||||
private:
|
||||
AtkTextIface();
|
||||
|
||||
static gchar *GetText(AtkText *text, int start_offset, int end_offset);
|
||||
static gchar *GetTextAfterOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset);
|
||||
static gchar *GetTextBeforeOffset(AtkText *text, int offset, AtkTextBoundary boundary_type, int *start_offset, int *end_offset);
|
||||
static gchar *GetTextAtOffset(AtkText *text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset);
|
||||
#if ATK_CHECK_VERSION(2, 10, 0)
|
||||
static gchar *GetStringAtOffset(AtkText *text, gint offset, AtkTextGranularity granularity, gint *start_offset, gint *end_offset);
|
||||
#endif
|
||||
static gunichar GetCharacterAtOffset(AtkText *text, gint offset);
|
||||
static gint GetCharacterCount(AtkText *text);
|
||||
static gint GetCaretOffset(AtkText *text);
|
||||
static gboolean SetCaretOffset(AtkText *text, gint offset);
|
||||
static gint GetOffsetAtPoint(AtkText *text, gint x, gint y, AtkCoordType coords);
|
||||
static void GetCharacterExtents(AtkText *text, gint offset, gint *x, gint *y, gint *width, gint *height, AtkCoordType coords);
|
||||
static AtkAttributeSet *GetRunAttributes(AtkText *text, gint offset, gint *start_offset, gint *end_offset);
|
||||
static AtkAttributeSet *GetDefaultAttributes(AtkText *text);
|
||||
static gint GetNSelections(AtkText *text);
|
||||
static gchar *GetSelection(AtkText *text, gint selection_num, gint *start_pos, gint *end_pos);
|
||||
static gboolean AddSelection(AtkText *text, gint start, gint end);
|
||||
static gboolean RemoveSelection(AtkText *text, gint selection_num);
|
||||
static gboolean SetSelection(AtkText *text, gint selection_num, gint start, gint end);
|
||||
};
|
||||
class AtkEditableTextIface {
|
||||
public:
|
||||
static void init(::AtkEditableTextIface *iface);
|
||||
|
||||
private:
|
||||
AtkEditableTextIface();
|
||||
|
||||
static void SetTextContents(AtkEditableText *text, const gchar *contents);
|
||||
static void InsertText(AtkEditableText *text, const gchar *contents, gint length, gint *position);
|
||||
static void CopyText(AtkEditableText *text, gint start, gint end);
|
||||
static void CutText(AtkEditableText *text, gint start, gint end);
|
||||
static void DeleteText(AtkEditableText *text, gint start, gint end);
|
||||
static void PasteText(AtkEditableText *text, gint position);
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
109
3rdparty/scintilla550/scintilla/gtk/Wrappers.h
vendored
Normal file
109
3rdparty/scintilla550/scintilla/gtk/Wrappers.h
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
// Scintilla source code edit control
|
||||
// Wrappers.h - Encapsulation of GLib, GObject, Pango, Cairo, GTK, and GDK types
|
||||
// Copyright 2022 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef WRAPPERS_H
|
||||
#define WRAPPERS_H
|
||||
|
||||
namespace Scintilla::Internal {
|
||||
|
||||
// GLib
|
||||
|
||||
struct GFreeReleaser {
|
||||
template <class T>
|
||||
void operator()(T *object) noexcept {
|
||||
g_free(object);
|
||||
}
|
||||
};
|
||||
|
||||
using UniqueStr = std::unique_ptr<gchar, GFreeReleaser>;
|
||||
|
||||
// GObject
|
||||
|
||||
struct GObjectReleaser {
|
||||
// Called by unique_ptr to destroy/free the object
|
||||
template <class T>
|
||||
void operator()(T *object) noexcept {
|
||||
g_object_unref(object);
|
||||
}
|
||||
};
|
||||
|
||||
// Pango
|
||||
|
||||
using UniquePangoContext = std::unique_ptr<PangoContext, GObjectReleaser>;
|
||||
using UniquePangoLayout = std::unique_ptr<PangoLayout, GObjectReleaser>;
|
||||
using UniquePangoFontMap = std::unique_ptr<PangoFontMap, GObjectReleaser>;
|
||||
|
||||
struct FontDescriptionReleaser {
|
||||
void operator()(PangoFontDescription *fontDescription) noexcept {
|
||||
pango_font_description_free(fontDescription);
|
||||
}
|
||||
};
|
||||
|
||||
using UniquePangoFontDescription = std::unique_ptr<PangoFontDescription, FontDescriptionReleaser>;
|
||||
|
||||
struct FontMetricsReleaser {
|
||||
void operator()(PangoFontMetrics *metrics) noexcept {
|
||||
pango_font_metrics_unref(metrics);
|
||||
}
|
||||
};
|
||||
|
||||
using UniquePangoFontMetrics = std::unique_ptr<PangoFontMetrics, FontMetricsReleaser>;
|
||||
|
||||
struct LayoutIterReleaser {
|
||||
// Called by unique_ptr to destroy/free the object
|
||||
void operator()(PangoLayoutIter *iter) noexcept {
|
||||
pango_layout_iter_free(iter);
|
||||
}
|
||||
};
|
||||
|
||||
using UniquePangoLayoutIter = std::unique_ptr<PangoLayoutIter, LayoutIterReleaser>;
|
||||
|
||||
// Cairo
|
||||
|
||||
struct CairoReleaser {
|
||||
void operator()(cairo_t *context) noexcept {
|
||||
cairo_destroy(context);
|
||||
}
|
||||
};
|
||||
|
||||
using UniqueCairo = std::unique_ptr<cairo_t, CairoReleaser>;
|
||||
|
||||
struct CairoSurfaceReleaser {
|
||||
void operator()(cairo_surface_t *psurf) noexcept {
|
||||
cairo_surface_destroy(psurf);
|
||||
}
|
||||
};
|
||||
|
||||
using UniqueCairoSurface = std::unique_ptr<cairo_surface_t, CairoSurfaceReleaser>;
|
||||
|
||||
// GTK
|
||||
|
||||
using UniqueIMContext = std::unique_ptr<GtkIMContext, GObjectReleaser>;
|
||||
|
||||
// GDK
|
||||
|
||||
struct GdkEventReleaser {
|
||||
void operator()(GdkEvent *ev) noexcept {
|
||||
gdk_event_free(ev);
|
||||
}
|
||||
};
|
||||
|
||||
using UniqueGdkEvent = std::unique_ptr<GdkEvent, GdkEventReleaser>;
|
||||
|
||||
inline void UnRefCursor(GdkCursor *cursor) noexcept {
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_object_unref(cursor);
|
||||
#else
|
||||
gdk_cursor_unref(cursor);
|
||||
#endif
|
||||
}
|
||||
|
||||
[[nodiscard]] inline GdkWindow *WindowFromWidget(GtkWidget *w) noexcept {
|
||||
return gtk_widget_get_window(w);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
520
3rdparty/scintilla550/scintilla/gtk/deps.mak
vendored
Normal file
520
3rdparty/scintilla550/scintilla/gtk/deps.mak
vendored
Normal file
@ -0,0 +1,520 @@
|
||||
# Created by DepGen.py. To recreate, run DepGen.py.
|
||||
PlatGTK.o: \
|
||||
PlatGTK.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../include/Scintilla.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ScintillaWidget.h \
|
||||
../src/CharacterType.h \
|
||||
../src/XPM.h \
|
||||
../src/UniConversion.h \
|
||||
Wrappers.h \
|
||||
Converter.h
|
||||
ScintillaGTK.o: \
|
||||
ScintillaGTK.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ScintillaStructures.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../include/Scintilla.h \
|
||||
../include/ScintillaWidget.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/CallTip.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/CaseConvert.h \
|
||||
../src/UniConversion.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h \
|
||||
../src/MarginView.h \
|
||||
../src/EditView.h \
|
||||
../src/Editor.h \
|
||||
../src/AutoComplete.h \
|
||||
../src/ScintillaBase.h \
|
||||
Wrappers.h \
|
||||
ScintillaGTK.h \
|
||||
scintilla-marshal.h \
|
||||
ScintillaGTKAccessible.h \
|
||||
Converter.h
|
||||
ScintillaGTKAccessible.o: \
|
||||
ScintillaGTKAccessible.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ScintillaStructures.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../include/Scintilla.h \
|
||||
../include/ScintillaWidget.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/CallTip.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/CaseConvert.h \
|
||||
../src/UniConversion.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h \
|
||||
../src/MarginView.h \
|
||||
../src/EditView.h \
|
||||
../src/Editor.h \
|
||||
../src/AutoComplete.h \
|
||||
../src/ScintillaBase.h \
|
||||
Wrappers.h \
|
||||
ScintillaGTK.h \
|
||||
ScintillaGTKAccessible.h
|
||||
AutoComplete.o: \
|
||||
../src/AutoComplete.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterType.h \
|
||||
../src/Position.h \
|
||||
../src/AutoComplete.h
|
||||
CallTip.o: \
|
||||
../src/CallTip.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/Position.h \
|
||||
../src/CallTip.h
|
||||
CaseConvert.o: \
|
||||
../src/CaseConvert.cxx \
|
||||
../src/CaseConvert.h \
|
||||
../src/UniConversion.h
|
||||
CaseFolder.o: \
|
||||
../src/CaseFolder.cxx \
|
||||
../src/CharacterType.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/CaseConvert.h
|
||||
CellBuffer.o: \
|
||||
../src/CellBuffer.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/SparseVector.h \
|
||||
../src/ChangeHistory.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/UndoHistory.h \
|
||||
../src/UniConversion.h
|
||||
ChangeHistory.o: \
|
||||
../src/ChangeHistory.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/SparseVector.h \
|
||||
../src/ChangeHistory.h
|
||||
CharacterCategoryMap.o: \
|
||||
../src/CharacterCategoryMap.cxx \
|
||||
../src/CharacterCategoryMap.h
|
||||
CharacterType.o: \
|
||||
../src/CharacterType.cxx \
|
||||
../src/CharacterType.h
|
||||
CharClassify.o: \
|
||||
../src/CharClassify.cxx \
|
||||
../src/CharacterType.h \
|
||||
../src/CharClassify.h
|
||||
ContractionState.o: \
|
||||
../src/ContractionState.cxx \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/SparseVector.h \
|
||||
../src/ContractionState.h
|
||||
DBCS.o: \
|
||||
../src/DBCS.cxx \
|
||||
../src/DBCS.h
|
||||
Decoration.o: \
|
||||
../src/Decoration.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/Decoration.h
|
||||
Document.o: \
|
||||
../src/Document.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/CharacterType.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/PerLine.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/RESearch.h \
|
||||
../src/UniConversion.h \
|
||||
../src/ElapsedPeriod.h
|
||||
EditModel.o: \
|
||||
../src/EditModel.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/UniConversion.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h
|
||||
Editor.o: \
|
||||
../src/Editor.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ScintillaStructures.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterType.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/PerLine.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/UniConversion.h \
|
||||
../src/DBCS.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h \
|
||||
../src/MarginView.h \
|
||||
../src/EditView.h \
|
||||
../src/Editor.h \
|
||||
../src/ElapsedPeriod.h
|
||||
EditView.o: \
|
||||
../src/EditView.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ScintillaStructures.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterType.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/PerLine.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/UniConversion.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h \
|
||||
../src/MarginView.h \
|
||||
../src/EditView.h \
|
||||
../src/ElapsedPeriod.h
|
||||
Geometry.o: \
|
||||
../src/Geometry.cxx \
|
||||
../src/Geometry.h
|
||||
Indicator.o: \
|
||||
../src/Indicator.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/Indicator.h \
|
||||
../src/XPM.h
|
||||
KeyMap.o: \
|
||||
../src/KeyMap.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/KeyMap.h
|
||||
LineMarker.o: \
|
||||
../src/LineMarker.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/XPM.h \
|
||||
../src/LineMarker.h \
|
||||
../src/UniConversion.h
|
||||
MarginView.o: \
|
||||
../src/MarginView.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ScintillaStructures.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/UniConversion.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h \
|
||||
../src/MarginView.h \
|
||||
../src/EditView.h
|
||||
PerLine.o: \
|
||||
../src/PerLine.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/PerLine.h
|
||||
PositionCache.o: \
|
||||
../src/PositionCache.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterType.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/UniConversion.h \
|
||||
../src/DBCS.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h
|
||||
RESearch.o: \
|
||||
../src/RESearch.cxx \
|
||||
../src/Position.h \
|
||||
../src/CharClassify.h \
|
||||
../src/RESearch.h
|
||||
RunStyles.o: \
|
||||
../src/RunStyles.cxx \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h
|
||||
ScintillaBase.o: \
|
||||
../src/ScintillaBase.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../include/ScintillaMessages.h \
|
||||
../include/ScintillaStructures.h \
|
||||
../include/ILoader.h \
|
||||
../include/Sci_Position.h \
|
||||
../include/ILexer.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/CharacterCategoryMap.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/ContractionState.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/CallTip.h \
|
||||
../src/KeyMap.h \
|
||||
../src/Indicator.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h \
|
||||
../src/CharClassify.h \
|
||||
../src/Decoration.h \
|
||||
../src/CaseFolder.h \
|
||||
../src/Document.h \
|
||||
../src/Selection.h \
|
||||
../src/PositionCache.h \
|
||||
../src/EditModel.h \
|
||||
../src/MarginView.h \
|
||||
../src/EditView.h \
|
||||
../src/Editor.h \
|
||||
../src/AutoComplete.h \
|
||||
../src/ScintillaBase.h
|
||||
Selection.o: \
|
||||
../src/Selection.cxx \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/Selection.h
|
||||
Style.o: \
|
||||
../src/Style.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/Style.h
|
||||
UndoHistory.o: \
|
||||
../src/UndoHistory.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Position.h \
|
||||
../src/SplitVector.h \
|
||||
../src/Partitioning.h \
|
||||
../src/RunStyles.h \
|
||||
../src/SparseVector.h \
|
||||
../src/ChangeHistory.h \
|
||||
../src/CellBuffer.h \
|
||||
../src/UndoHistory.h
|
||||
UniConversion.o: \
|
||||
../src/UniConversion.cxx \
|
||||
../src/UniConversion.h
|
||||
UniqueString.o: \
|
||||
../src/UniqueString.cxx \
|
||||
../src/UniqueString.h
|
||||
ViewStyle.o: \
|
||||
../src/ViewStyle.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/Position.h \
|
||||
../src/UniqueString.h \
|
||||
../src/Indicator.h \
|
||||
../src/XPM.h \
|
||||
../src/LineMarker.h \
|
||||
../src/Style.h \
|
||||
../src/ViewStyle.h
|
||||
XPM.o: \
|
||||
../src/XPM.cxx \
|
||||
../include/ScintillaTypes.h \
|
||||
../src/Debugging.h \
|
||||
../src/Geometry.h \
|
||||
../src/Platform.h \
|
||||
../src/XPM.h
|
172
3rdparty/scintilla550/scintilla/gtk/makefile
vendored
Normal file
172
3rdparty/scintilla550/scintilla/gtk/makefile
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
# Make file for Scintilla on Linux, macOS, or Windows
|
||||
# @file makefile
|
||||
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# This makefile assumes GCC 9.0+ is used and changes will be needed to use other compilers.
|
||||
# Clang 9.0+ can be used with CLANG=1 on command line.
|
||||
# Builds for GTK+ 2 and 3. GTK 3 requires GTK3=1 on command line.
|
||||
# Also works with ming32-make on Windows.
|
||||
|
||||
.PHONY: static shared all clean analyze depend
|
||||
|
||||
.SUFFIXES: .cxx .c .o .h .a .list
|
||||
|
||||
srcdir ?= .
|
||||
basedir = $(srcdir)/..
|
||||
|
||||
WARNINGS = -Wpedantic -Wall
|
||||
ifdef CLANG
|
||||
CXX = clang++
|
||||
CC = clang
|
||||
WARNINGS += -Wno-deprecated-register
|
||||
ifdef windir
|
||||
# Turn off some warnings that occur when Clang is being used on Windows where it
|
||||
# is including Microsoft headers.
|
||||
# incompatible-ms-struct is because more complex structs are not quite the same as MSVC
|
||||
WARNINGS += -Wno-incompatible-ms-struct
|
||||
# language-extension-token is because of __int64 in glib-2.0 glibconfig.h
|
||||
WARNINGS += -Wno-language-extension-token
|
||||
# register may be used in glib
|
||||
# This produces a warning since -Wno-register is not valid for C files but it still works
|
||||
WARNINGS += -Wno-register
|
||||
endif
|
||||
# Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for
|
||||
# thread also need to create Position Independent Executable -> search online documentation
|
||||
SANITIZE = address
|
||||
#SANITIZE = undefined
|
||||
BASE_FLAGS += -fsanitize=$(SANITIZE)
|
||||
endif
|
||||
ARFLAGS = rc
|
||||
RANLIB ?= ranlib
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
GTK_VERSION = $(if $(GTK3),gtk+-3.0,gtk+-2.0)
|
||||
|
||||
# Environment variable windir always defined on Win32
|
||||
|
||||
# Enable Position Independent Code except on Windows where it is the default so the flag produces a warning
|
||||
ifndef windir
|
||||
BASE_FLAGS += -fPIC
|
||||
ifeq ($(shell uname),Darwin)
|
||||
LDFLAGS += -dynamiclib
|
||||
endif
|
||||
endif
|
||||
|
||||
LDFLAGS += -shared
|
||||
|
||||
# Take care of changing Unix style '/' directory separator to '\' on Windows
|
||||
normalize = $(if $(windir),$(subst /,\,$1),$1)
|
||||
|
||||
PYTHON = $(if $(windir),pyw,python3)
|
||||
|
||||
SHAREDEXTENSION = $(if $(windir),dll,so)
|
||||
|
||||
ifdef windir
|
||||
CC = gcc
|
||||
DEL = del /q
|
||||
else
|
||||
DEL = rm -f
|
||||
endif
|
||||
COMPLIB=$(basedir)/bin/scintilla.a
|
||||
COMPONENT=$(basedir)/bin/libscintilla.$(SHAREDEXTENSION)
|
||||
|
||||
vpath %.h $(srcdir) $(basedir)/src $(basedir)/include
|
||||
vpath %.c $(srcdir)
|
||||
vpath %.cxx $(srcdir) $(basedir)/src
|
||||
|
||||
INCLUDES=-I $(basedir)/include -I $(basedir)/src
|
||||
DEFINES += -DGTK
|
||||
BASE_FLAGS += $(WARNINGS)
|
||||
|
||||
ifdef NO_CXX11_REGEX
|
||||
DEFINES += -DNO_CXX11_REGEX
|
||||
endif
|
||||
|
||||
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
|
||||
BASE_FLAGS += $(if $(DEBUG),-g,-O3)
|
||||
|
||||
CXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS)
|
||||
CXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS) $(CONFIG_FLAGS)
|
||||
|
||||
CONFIG_FLAGS:=$(shell $(PKG_CONFIG) --cflags $(GTK_VERSION))
|
||||
CONFIGLIB:=$(shell $(PKG_CONFIG) --libs $(GTK_VERSION) gmodule-no-export-2.0)
|
||||
MARSHALLER=scintilla-marshal.o
|
||||
|
||||
all: $(COMPLIB) $(COMPONENT)
|
||||
|
||||
static: $(COMPLIB)
|
||||
|
||||
shared: $(COMPONENT)
|
||||
|
||||
clean:
|
||||
$(DEL) *.o $(call normalize,$(COMPLIB)) $(call normalize,$(COMPONENT)) *.plist
|
||||
|
||||
%.o: %.cxx
|
||||
$(CXX) $(CPPFLAGS) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $<
|
||||
%.o: %.c
|
||||
$(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $<
|
||||
|
||||
GLIB_GENMARSHAL = glib-genmarshal
|
||||
GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal
|
||||
|
||||
%.h: %.list
|
||||
$(GLIB_GENMARSHAL) --header $(GLIB_GENMARSHAL_FLAGS) $< > $@
|
||||
%.c: %.list
|
||||
$(GLIB_GENMARSHAL) --body $(GLIB_GENMARSHAL_FLAGS) $< > $@
|
||||
|
||||
analyze:
|
||||
clang --analyze $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(CXX_BASE_FLAGS) $(CXXFLAGS) $(srcdir)/*.cxx $(basedir)/src/*.cxx
|
||||
|
||||
depend deps.mak:
|
||||
$(PYTHON) DepGen.py
|
||||
|
||||
# Required for base Scintilla
|
||||
SRC_OBJS = \
|
||||
AutoComplete.o \
|
||||
CallTip.o \
|
||||
CaseConvert.o \
|
||||
CaseFolder.o \
|
||||
CellBuffer.o \
|
||||
ChangeHistory.o \
|
||||
CharacterCategoryMap.o \
|
||||
CharacterType.o \
|
||||
CharClassify.o \
|
||||
ContractionState.o \
|
||||
DBCS.o \
|
||||
Decoration.o \
|
||||
Document.o \
|
||||
EditModel.o \
|
||||
Editor.o \
|
||||
EditView.o \
|
||||
Geometry.o \
|
||||
Indicator.o \
|
||||
KeyMap.o \
|
||||
LineMarker.o \
|
||||
MarginView.o \
|
||||
PerLine.o \
|
||||
PositionCache.o \
|
||||
RESearch.o \
|
||||
RunStyles.o \
|
||||
Selection.o \
|
||||
Style.o \
|
||||
UndoHistory.o \
|
||||
UniConversion.o \
|
||||
UniqueString.o \
|
||||
ViewStyle.o \
|
||||
XPM.o
|
||||
|
||||
GTK_OBJS = \
|
||||
ScintillaBase.o \
|
||||
PlatGTK.o \
|
||||
ScintillaGTK.o \
|
||||
ScintillaGTKAccessible.o
|
||||
|
||||
$(COMPLIB): $(SRC_OBJS) $(GTK_OBJS) $(MARSHALLER)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
$(COMPONENT): $(SRC_OBJS) $(GTK_OBJS) $(MARSHALLER)
|
||||
$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(CONFIGLIB)
|
||||
|
||||
# Automatically generate header dependencies with "make depend"
|
||||
include deps.mak
|
122
3rdparty/scintilla550/scintilla/gtk/scintilla-marshal.c
vendored
Normal file
122
3rdparty/scintilla550/scintilla/gtk/scintilla-marshal.c
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
#include <glib-object.h>
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
|
||||
#define g_marshal_value_peek_char(v) g_value_get_schar (v)
|
||||
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
|
||||
#define g_marshal_value_peek_int(v) g_value_get_int (v)
|
||||
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
|
||||
#define g_marshal_value_peek_long(v) g_value_get_long (v)
|
||||
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
|
||||
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
|
||||
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
|
||||
#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
|
||||
#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
|
||||
#define g_marshal_value_peek_float(v) g_value_get_float (v)
|
||||
#define g_marshal_value_peek_double(v) g_value_get_double (v)
|
||||
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
|
||||
#define g_marshal_value_peek_param(v) g_value_get_param (v)
|
||||
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
|
||||
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
|
||||
#define g_marshal_value_peek_object(v) g_value_get_object (v)
|
||||
#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
|
||||
#else /* !G_ENABLE_DEBUG */
|
||||
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
|
||||
* Do not access GValues directly in your code. Instead, use the
|
||||
* g_value_get_*() functions
|
||||
*/
|
||||
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
|
||||
#define g_marshal_value_peek_char(v) (v)->data[0].v_int
|
||||
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
|
||||
#define g_marshal_value_peek_int(v) (v)->data[0].v_int
|
||||
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
|
||||
#define g_marshal_value_peek_long(v) (v)->data[0].v_long
|
||||
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
|
||||
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
|
||||
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
|
||||
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
|
||||
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
|
||||
#define g_marshal_value_peek_float(v) (v)->data[0].v_float
|
||||
#define g_marshal_value_peek_double(v) (v)->data[0].v_double
|
||||
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
|
||||
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
|
||||
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
|
||||
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
|
||||
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
|
||||
#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
|
||||
#endif /* !G_ENABLE_DEBUG */
|
||||
|
||||
/* VOID:INT,OBJECT (scintilla-marshal.list:1) */
|
||||
void
|
||||
scintilla_marshal_VOID__INT_OBJECT (GClosure *closure,
|
||||
GValue *return_value G_GNUC_UNUSED,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint G_GNUC_UNUSED,
|
||||
gpointer marshal_data)
|
||||
{
|
||||
typedef void (*GMarshalFunc_VOID__INT_OBJECT) (gpointer data1,
|
||||
gint arg1,
|
||||
gpointer arg2,
|
||||
gpointer data2);
|
||||
GCClosure *cc = (GCClosure *) closure;
|
||||
gpointer data1, data2;
|
||||
GMarshalFunc_VOID__INT_OBJECT callback;
|
||||
|
||||
g_return_if_fail (n_param_values == 3);
|
||||
|
||||
if (G_CCLOSURE_SWAP_DATA (closure))
|
||||
{
|
||||
data1 = closure->data;
|
||||
data2 = g_value_peek_pointer (param_values + 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
data1 = g_value_peek_pointer (param_values + 0);
|
||||
data2 = closure->data;
|
||||
}
|
||||
callback = (GMarshalFunc_VOID__INT_OBJECT) (marshal_data ? marshal_data : cc->callback);
|
||||
|
||||
callback (data1,
|
||||
g_marshal_value_peek_int (param_values + 1),
|
||||
g_marshal_value_peek_object (param_values + 2),
|
||||
data2);
|
||||
}
|
||||
|
||||
/* VOID:INT,BOXED (scintilla-marshal.list:2) */
|
||||
void
|
||||
scintilla_marshal_VOID__INT_BOXED (GClosure *closure,
|
||||
GValue *return_value G_GNUC_UNUSED,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint G_GNUC_UNUSED,
|
||||
gpointer marshal_data)
|
||||
{
|
||||
typedef void (*GMarshalFunc_VOID__INT_BOXED) (gpointer data1,
|
||||
gint arg1,
|
||||
gpointer arg2,
|
||||
gpointer data2);
|
||||
GCClosure *cc = (GCClosure *) closure;
|
||||
gpointer data1, data2;
|
||||
GMarshalFunc_VOID__INT_BOXED callback;
|
||||
|
||||
g_return_if_fail (n_param_values == 3);
|
||||
|
||||
if (G_CCLOSURE_SWAP_DATA (closure))
|
||||
{
|
||||
data1 = closure->data;
|
||||
data2 = g_value_peek_pointer (param_values + 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
data1 = g_value_peek_pointer (param_values + 0);
|
||||
data2 = closure->data;
|
||||
}
|
||||
callback = (GMarshalFunc_VOID__INT_BOXED) (marshal_data ? marshal_data : cc->callback);
|
||||
|
||||
callback (data1,
|
||||
g_marshal_value_peek_int (param_values + 1),
|
||||
g_marshal_value_peek_boxed (param_values + 2),
|
||||
data2);
|
||||
}
|
||||
|
30
3rdparty/scintilla550/scintilla/gtk/scintilla-marshal.h
vendored
Normal file
30
3rdparty/scintilla550/scintilla/gtk/scintilla-marshal.h
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
/* This file is generated, all changes will be lost */
|
||||
#ifndef __SCINTILLA_MARSHAL_MARSHAL_H__
|
||||
#define __SCINTILLA_MARSHAL_MARSHAL_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* VOID:INT,OBJECT (scintilla-marshal.list:1) */
|
||||
extern
|
||||
void scintilla_marshal_VOID__INT_OBJECT (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
/* VOID:INT,BOXED (scintilla-marshal.list:2) */
|
||||
extern
|
||||
void scintilla_marshal_VOID__INT_BOXED (GClosure *closure,
|
||||
GValue *return_value,
|
||||
guint n_param_values,
|
||||
const GValue *param_values,
|
||||
gpointer invocation_hint,
|
||||
gpointer marshal_data);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __SCINTILLA_MARSHAL_MARSHAL_H__ */
|
2
3rdparty/scintilla550/scintilla/gtk/scintilla-marshal.list
vendored
Normal file
2
3rdparty/scintilla550/scintilla/gtk/scintilla-marshal.list
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
VOID:INT,OBJECT
|
||||
VOID:INT,BOXED
|
Reference in New Issue
Block a user