You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if anyone could help me answer any or all of these questions. For context I'm trying to write Rust bindings for the API, which is why I'm extra interested in how it works in general as opposed to does my current app do what I expect.
1
It looks to me like the errors would pile up if axoverlay_destroy_overlay fails in this snippet, which from my understanding of the docs is a bug. Is this a mistake in the app or does the API follow some other convention?
axoverlay_redraw(&error);
if (error!=NULL) {
syslog(LOG_ERR, "Failed to draw overlays: %s", error->message);
axoverlay_destroy_overlay(overlay_id, &error);
axoverlay_destroy_overlay(overlay_id_text, &error_text);
axoverlay_cleanup();
g_error_free(error);
g_error_free(error_text);
return1;
}
This seems to contradict the example where axoverlay_is_backend_supported is called first:
if (!axoverlay_is_backend_supported(AXOVERLAY_CAIRO_IMAGE_BACKEND)) {
syslog(LOG_ERR, "AXOVERLAY_CAIRO_IMAGE_BACKEND is not supported");
return1;
}
// Initialize the librarystructaxoverlay_settingssettings;
axoverlay_init_axoverlay_settings(&settings);
settings.render_callback=render_overlay_cb;
settings.adjustment_callback=adjustment_cb;
settings.select_callback=NULL;
settings.backend=AXOVERLAY_CAIRO_IMAGE_BACKEND;
axoverlay_init(&settings, &error);
Am I correct in assuming that this function is exempted?
If so, are there any other exempted functions (apart from the setters that explicitly say they must be called before axoverlay_init)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be great if anyone could help me answer any or all of these questions. For context I'm trying to write Rust bindings for the API, which is why I'm extra interested in how it works in general as opposed to does my current app do what I expect.
1
It looks to me like the errors would pile up if
axoverlay_destroy_overlay
fails in this snippet, which from my understanding of the docs is a bug. Is this a mistake in the app or does the API follow some other convention?acap-native-sdk-examples/axoverlay/app/axoverlay.c
Line 446 in 33b7742
https://docs.gtk.org/glib/error-reporting.html#rules-for-use-of-gerror
2
Should this be read to imply that the default value is something other than
NULL
?acap-native-sdk-examples/axoverlay/app/axoverlay.c
Line 383 in 33b7742
https://axiscommunications.github.io/acap-documentation/3.5/api/axoverlay/html/axoverlay_8h.html#a3564acf79f48af97e2414127696f82d7
3
The docs state that
https://axiscommunications.github.io/acap-documentation/3.5/api/axoverlay/html/axoverlay_8h.html#abcee514e8d556934e857fd594a471865
This seems to contradict the example where
axoverlay_is_backend_supported
is called first:Am I correct in assuming that this function is exempted?
If so, are there any other exempted functions (apart from the setters that explicitly say they must be called before
axoverlay_init
)?Beta Was this translation helpful? Give feedback.
All reactions