mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-08-15 15:00:28 +03:00
lvgui: Add bmp bindings and support
This commit is contained in:
parent
a704d644fe
commit
95f818dec3
@ -21,6 +21,7 @@ module LVGL::Hacks
|
||||
LVGL::Hacks.set_assets_path(data_dir)
|
||||
|
||||
LVGUI::Native.hal_init(get_asset_path(""))
|
||||
LVGUI::Native.lv_bmp_init()
|
||||
LVGUI::Native.lv_nanosvg_init()
|
||||
end
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <lv_drv_conf.h>
|
||||
#include <lv_conf.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <lv_lib_bmp/lv_bmp.h>
|
||||
#include <lv_lib_nanosvg/lv_nanosvg.h>
|
||||
#include <font.h>
|
||||
#include <hal.h>
|
||||
@ -4886,6 +4887,27 @@ mrb_mruby_lvgui_native_hal_init(mrb_state *mrb, mrb_value self)
|
||||
//
|
||||
////////
|
||||
|
||||
////////
|
||||
// Bindings for: `void lv_bmp_init()`
|
||||
|
||||
static mrb_value
|
||||
mrb_mruby_lvgui_native_lv_bmp_init(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
/* No return value */
|
||||
|
||||
|
||||
|
||||
|
||||
// Calling native function
|
||||
lv_bmp_init();
|
||||
|
||||
// Converts return value back to a valid mruby value
|
||||
return mrb_nil_value();
|
||||
}
|
||||
|
||||
//
|
||||
////////
|
||||
|
||||
////////
|
||||
// Bindings for: `void lv_nanosvg_init()`
|
||||
|
||||
@ -13587,6 +13609,22 @@ mrb_mruby_lvgui_native_gem_init(mrb_state* mrb)
|
||||
mrb_mruby_lvgui_native_wrap_pointer(mrb, (void *) hal_init)
|
||||
);
|
||||
|
||||
// ```void lv_bmp_init();```
|
||||
mrb_define_module_function(
|
||||
mrb,
|
||||
mLVGUI__Native,
|
||||
"lv_bmp_init",
|
||||
mrb_mruby_lvgui_native_lv_bmp_init,
|
||||
MRB_ARGS_REQ(0)
|
||||
);
|
||||
|
||||
mrb_hash_set(
|
||||
mrb,
|
||||
mLVGUI__Native__References,
|
||||
mrb_symbol_value(mrb_intern_lit(mrb, "lv_bmp_init")),
|
||||
mrb_mruby_lvgui_native_wrap_pointer(mrb, (void *) lv_bmp_init)
|
||||
);
|
||||
|
||||
// ```void lv_nanosvg_init();```
|
||||
mrb_define_module_function(
|
||||
mrb,
|
||||
|
Loading…
Reference in New Issue
Block a user