Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why SourceView named View in bingings #123

Closed
gavr123456789 opened this issue Apr 11, 2021 · 1 comment
Closed

Why SourceView named View in bingings #123

gavr123456789 opened this issue Apr 11, 2021 · 1 comment

Comments

@gavr123456789
Copy link

I already thought that it was not there until I started searching in bindings, going through each subsequent mention of type, recognizing it by inheritance from TextView

@StefanSalewski
Copy link
Owner

grep -A8 "class name=\"View\"" /opt/gtk/share/gir-1.0/GtkSource-5.gir 
    <class name="View"
           c:symbol-prefix="view"
           c:type="GtkSourceView"
           parent="Gtk.TextView"
           glib:type-name="GtkSourceView"
           glib:get-type="gtk_source_view_get_type"
           glib:type-struct="ViewClass">
      <source-position filename="../gtksourceview/gtksourceview.h" line="105"/>
      <implements name="Gtk.Accessible"/>

So the GIR file name is GtkSource-5.gir ommitting view, and the class name is View.

You may ask the gtk core devs why they named it this way.

For the GTK4 book an GtkSourceView example was planned, I have it already on my local box, related to my old NED text editor. But GtkSourceView needs a lot of explanations, it is not an easy lib. And I think I mentioned GtkSourceView in the README where I may gave a textview example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants