mirror of
https://gitlab.com/eql/lqml.git
synced 2026-01-14 05:11:25 -08:00
example 'meshtastic', add iOS version, background ini, startup animation
This commit is contained in:
parent
1f72af5440
commit
0446628830
25 changed files with 181 additions and 111 deletions
|
|
@ -23,11 +23,11 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
void iniCLFunctions() {
|
||||
cl_object qml(STRING("QML"));
|
||||
if (cl_find_package(qml) == ECL_NIL) {
|
||||
cl_make_package(1, qml);
|
||||
cl_object l_qml(STRING("QML"));
|
||||
if (cl_find_package(l_qml) == ECL_NIL) {
|
||||
cl_make_package(1, l_qml);
|
||||
}
|
||||
si_select_package(qml);
|
||||
si_select_package(l_qml);
|
||||
DEFUN ("clipboard-text", clipboard_text, 0)
|
||||
DEFUN ("%disable-clipboard-menu", disable_clipboard_menu2, 1)
|
||||
DEFUN ("%ensure-permissions", ensure_permissions2, 1)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include <QQuickView>
|
||||
#include <QDebug>
|
||||
|
||||
const char LQML::version[] = "23.5.2"; // May 2023
|
||||
const char LQML::version[] = "23.6.1"; // June 2023
|
||||
|
||||
extern "C" void ini_LQML(cl_object);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define ADD_MACOS_BUNDLE_IMPORT_PATH
|
||||
#endif
|
||||
|
||||
#ifdef INI_LISP
|
||||
#if (defined INI_LISP) || (defined BACKGROUND_INI_LISP)
|
||||
extern "C" void ini_app(cl_object);
|
||||
#endif
|
||||
|
||||
|
|
@ -54,6 +54,13 @@ int catch_all_qexec() {
|
|||
return ret;
|
||||
}
|
||||
|
||||
cl_object do_ini_app() {
|
||||
#ifdef BACKGROUND_INI_LISP
|
||||
ecl_init_module(NULL, ini_app);
|
||||
#endif
|
||||
return Cnil;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
#if QT_VERSION < 0x060000
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
|
|
@ -93,6 +100,10 @@ int main(int argc, char* argv[]) {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
cl_object l_qml(STRING("QML"));
|
||||
si_select_package(l_qml);
|
||||
DEFUN ("do-ini-app", do_ini_app, 0)
|
||||
|
||||
QTranslator translator;
|
||||
if ((QFile::exists("i18n") && translator.load(QLocale(), QString(), QString(), "i18n"))
|
||||
|| translator.load(QLocale(), QString(), QString(), ":/i18n")) {
|
||||
|
|
@ -165,6 +176,10 @@ int main(int argc, char* argv[]) {
|
|||
ecl_init_module(NULL, ini_app);
|
||||
#endif
|
||||
|
||||
#ifdef BACKGROUND_INI_LISP
|
||||
LQML::eval("(qml::background-ini)", true); // see 'ini.liso'
|
||||
#endif
|
||||
|
||||
#ifdef NO_QT_RESTART
|
||||
bool qtRestart = false;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,11 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#undef SLOT
|
||||
|
||||
#include <ecl/ecl.h>
|
||||
#include <QQmlEngine>
|
||||
#include <QGuiApplication>
|
||||
#include <QInputMethodEvent>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define STRING(s) ecl_make_constant_base_string(s, -1)
|
||||
|
||||
#define DEFUN(name, c_name, num_args) \
|
||||
ecl_def_c_function(ecl_read_from_cstring(name), (cl_objectfn_fixed)c_name, num_args);
|
||||
|
||||
cl_object do_ini_app (); // for background ini
|
||||
|
||||
class Engine : public QQmlEngine {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue