Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add GtkTextIter Helpers #9

Open
nlogozzo opened this issue Jul 28, 2023 · 0 comments
Open

Add GtkTextIter Helpers #9

nlogozzo opened this issue Jul 28, 2023 · 0 comments

Comments

@nlogozzo
Copy link
Member

Here is what is used in Denaro:

[StructLayout(LayoutKind.Sequential)]
public struct TextIter 
{
    public nint dummy1;
    public nint dummy2;
    public int dummy3;
    public int dummy4;
    public int dummy5;
    public int dummy6;
    public int dummy7;
    public int dummy8;
    public nint dummy9;
    public nint dummy10;
    public int dummy11;
    public int dummy12;
    public int dummy13;
    public nint dummy14;
}

[LibraryImport("libadwaita-1.so.0", StringMarshalling = StringMarshalling.Utf8)]
private static partial void gtk_text_buffer_get_bounds(nint buffer, ref TextIter startIter, ref TextIter endIter);

[LibraryImport("libadwaita-1.so.0", StringMarshalling = StringMarshalling.Utf8)]
private static partial string gtk_text_buffer_get_text(nint buffer, ref TextIter startIter, ref TextIter endIter, [MarshalAs(UnmanagedType.I1)]bool include_hidden_chars);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant