Skip to content

Commit

Permalink
Add Linux bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Mar 6, 2024
1 parent 8211dd9 commit 785d7c6
Show file tree
Hide file tree
Showing 5 changed files with 380 additions and 18 deletions.
16 changes: 10 additions & 6 deletions packages/celest_core/ffigen.glib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ description: |
Regenerate bindings with `dart run ffigen --config=ffigen.glib.yaml`.
language: c
output: lib/src/native/linux/glib.ffi.dart
compiler-opts:
- -I./third_party/glib/
- -I./third_party/glib/glib/
headers:
entry-points:
- third_party/glib/glib/glib.h
- third_party/glib/glib/glib-object.h
- third_party/glib/gio/gio.h
- /usr/include/glib-2.0/glib.h
- /usr/include/glib-2.0/glib-object.h
- /usr/include/glib-2.0/gio/gio.h
preamble: |
// ignore_for_file: type=lint
// ignore_for_file: return_of_invalid_type
Expand All @@ -22,6 +19,11 @@ comments:
length: full

exclude-all-by-default: true
typedefs:
include:
- gboolean
- gint
- gpointer
functions:
include:
- g_hash_table_new
Expand All @@ -30,9 +32,11 @@ functions:
structs:
include:
- _GError
- _GHashTable
- _GCancellable
- _GObject
rename:
"_GError": GError
"_GHashTable": GHashTable
"_GCancellable": GCancellable
"_GObject": GObject
7 changes: 1 addition & 6 deletions packages/celest_core/ffigen.libsecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ description: |
Regenerate bindings with `dart run ffigen --config=ffigen.libsecret.yaml`.
language: c
output: lib/src/native/linux/libsecret.ffi.dart
compiler-opts:
- -I./third_party/glib/
- -I./third_party/glib/glib/
headers:
entry-points:
- third_party/libsecret/libsecret/secret.h
- third_party/libsecret/libsecret/secret-schema.h
- third_party/libsecret/libsecret/secret-password.h
- /usr/include/libsecret-1/libsecret/secret.h
preamble: |
// ignore_for_file: type=lint
// ignore_for_file: return_of_invalid_type
Expand Down
169 changes: 169 additions & 0 deletions packages/celest_core/lib/src/native/linux/glib.ffi.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 785d7c6

Please sign in to comment.