-
Notifications
You must be signed in to change notification settings - Fork 29
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
Signals, Cairo, Events + General Cleanup #323
Conversation
Delegates work now (yay!) so let's use the closure marshal directly. This simplifies the code quite a bit, and gets us closer to working signals.
We need to check the documentation generation as the old union generation behavior is restored which could break the documentation again. |
This could possibly be a standalone project
… into wip/mjake/signals
…p/mjake/signals
- Avoid sizing errors by ensuring enums are always int-based (32-bits) - Determine whether to use a signed or unsigned int depending on the presence of a negative value - Perhaps clarify this with upstream? Seems to work reliably for now.
- Adds a (mostly) functional text editor demo that reimplements the basic feature set of GtkTextView using a piece table. - Demonstrates custom drawing with cairo and event handling using GDK/Signals.
- Adds a (mostly) functional text editor demo that reimplements the basic feature set of GtkTextView using a piece table. - Demonstrates custom drawing with cairo and event handling using GDK/Signals.
… into wip/mjake/signals
Had this error when doing key input after the drawing area stopped drawing:
So maybe it isn't signal related and in fact a sign some underlying object is being freed. Edit: Closure is being freed too:
Edit 2: Another error:
Edit 3: Some more findings, this is very bizarre. I'm getting an output of "<NULL-class>" when checking the From glib's gtype.c: const gchar *
g_type_name_from_instance (GTypeInstance *instance)
{
if (!instance)
return "<NULL-instance>";
else
return g_type_name_from_class (instance->g_class);
}
const gchar *
g_type_name_from_class (GTypeClass *g_class)
{
if (!g_class)
return "<NULL-class>";
else
return g_type_name (g_class->g_type);
} This means the type class (g_class) is somehow NULL. Which means either the object is half-finalized or very badly corrupted. Edit 4: The rest of the fields are all NULL as well. Looks like a simple case of use-after-free. Probably means the ToggleRef implementation is broken. |
It can not be avoided completely, du to data structures of GDK.Event. Hopefully the workaround gets obsolete once we support GDK4.
`gtk_im_context_simple_new` returns an owned reference according to the documentation. This information must be given to the object instantiation process to avoid leaking memory. See: https://docs.gtk.org/gtk3/ctor.IMContextSimple.new.html
bfdf1af
to
9aee619
Compare
This adds some basic tests using GdkPixbuf which allows to run them as integration tests. Integration tests can be automatically run during continous integration on the server. - Add test for basic property reading - Add test for object disposal by garbage collector - Add test for object disposal by "Dispose" method.
9aee619
to
8775b87
Compare
- Add Quickstart - Add DrawingArea - Add TextEditor
This restores our old support for signals now that delegates work as expected.
This is technically done, but needs some further testing.
It also includes:
TODO (before merge):
Value.Extract
must work for arbitrary records/ Gst.MiniObject / etc(MiniObject is for another PR)Tests(Next PR: Unit Test all of GLib/GObject)