-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Conversation
README.md
Outdated
GResourceLookupFlags.G_RESOURCE_LOOKUP_FLAGS_NONE, | ||
null | ||
) | ||
val importantDataContents: Ptr[Byte] = g_bytes_get_data(testData, null) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
Yes. There are gtk methods that take a resource path. This is, for example,
how ui layouts are loaded. I can change the example to one of those.
…On Thu, May 30, 2024, 00:42 Anton Sviridov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md
<#15 (comment)>
:
> @@ -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
Does this resource integration have additional benefits on top of Scala
Native's basic resource embedding
<https://scala-native.org/en/stable/lib/javalib.html#embedding-resources>?
I.e. are there GLib/Gnome/etc. methods that take, for example, a resource
name, thus providing deeper integration?
—
Reply to this email directly, view it on GitHub
<#15 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAIMDIG2MAYVBFPKUSXOQ3ZE3J7RAVCNFSM6AAAAABIJ6OQISVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOBXGQ4DINZWGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
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 |
@coreyoconnor that sounds good with one change - I think it can be a separate example file, like Eventually I want to make those files individually runnable with Scala CLI. |
Makes sense! I'll make that change. |
See https://github.com/coreyoconnor/scala-native-gtk-bindings#gio-resource-integration