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

WIP: Documentation for using glib-compile-resources #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

coreyoconnor
Copy link

@coreyoconnor coreyoconnor commented May 26, 2024

README.md Outdated
GResourceLookupFlags.G_RESOURCE_LOOKUP_FLAGS_NONE,
null
)
val importantDataContents: Ptr[Byte] = g_bytes_get_data(testData, null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is testData coming from?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected!

@@ -32,3 +32,90 @@ $ scala-cli run ./examples/src/main/scala/example.scala --native --native-compil
Bindings generated using [sn-bindgen](https://sn-bindgen.indoorvivants.com/)

![GtkBindingsDemo](https://user-images.githubusercontent.com/1052965/217792578-a4faa191-053b-48a7-aa2a-207709690fa1.gif)

## GIO Resource Integration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this resource integration have additional benefits on top of Scala Native's basic resource embedding?

I.e. are there GLib/Gnome/etc. methods that take, for example, a resource name, thus providing deeper integration?

@coreyoconnor
Copy link
Author

coreyoconnor commented May 30, 2024 via email

@coreyoconnor
Copy link
Author

What do you think of this plan: extending the provided example ( https://github.com/indoorvivants/scala-native-gtk-bindings/blob/main/examples/src/main/scala/example.scala ) to load in a UI definition of the main window; Change this documentation to point to that example for the code.

That would demonstrate the typical usage: Loading in a .ui.

@keynmol
Copy link
Collaborator

keynmol commented Jun 1, 2024

@coreyoconnor that sounds good with one change - I think it can be a separate example file, like example-ui.scala or something.

Eventually I want to make those files individually runnable with Scala CLI.

@coreyoconnor coreyoconnor changed the title Documentation for using glib-compile-resources WIP: Documentation for using glib-compile-resources Jun 3, 2024
@coreyoconnor
Copy link
Author

Makes sense! I'll make that change.

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

Successfully merging this pull request may close these issues.

3 participants