mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Fix conflicts
This commit is contained in:
2
.github/workflows/ci-workflow.yml
vendored
2
.github/workflows/ci-workflow.yml
vendored
@@ -103,7 +103,7 @@ jobs:
|
||||
steps:
|
||||
- run: brew install numworks/tap/epsilon-sdk
|
||||
- uses: actions/checkout@v1
|
||||
- run: make -j2 PLATFORM=simulator TARGET=ios GOOGLE_ANALYTICS=0
|
||||
- run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-simulator-ios.ipa
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
static App * app() {
|
||||
return static_cast<App *>(Container::activeApp());
|
||||
}
|
||||
TELEMETRY_ID("Calculation");
|
||||
bool textFieldDidReceiveEvent(::TextField * textField, Ion::Events::Event event) override;
|
||||
bool layoutFieldDidReceiveEvent(::LayoutField * layoutField, Ion::Events::Event event) override;
|
||||
// TextFieldDelegateApp
|
||||
|
||||
@@ -137,7 +137,6 @@ bool EditExpressionController::inputViewDidReceiveEvent(Ion::Events::Event event
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool EditExpressionController::inputViewDidFinishEditing(const char * text, Layout layoutR) {
|
||||
Context * context = textFieldDelegateApp()->localContext();
|
||||
if (layoutR.isUninitialized()) {
|
||||
@@ -149,6 +148,7 @@ bool EditExpressionController::inputViewDidFinishEditing(const char * text, Layo
|
||||
m_calculationStore->push(m_cacheBuffer, context);
|
||||
m_historyController->reload();
|
||||
m_contentView.expressionField()->setEditing(true, true);
|
||||
telemetryReportEvent("Input", m_cacheBuffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ void HistoryController::reload() {
|
||||
}
|
||||
|
||||
void HistoryController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
View * view() override { return &m_selectableTableView; }
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("");
|
||||
void didBecomeFirstResponder() override;
|
||||
void willExitResponderChain(Responder * nextFirstResponder) override;
|
||||
void reload();
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
return static_cast<App *>(Container::activeApp());
|
||||
}
|
||||
~App();
|
||||
TELEMETRY_ID("Code");
|
||||
bool prepareForExit() override {
|
||||
if (m_consoleController.inputRunLoopActive()) {
|
||||
m_consoleController.terminateInputLoop();
|
||||
|
||||
@@ -163,6 +163,7 @@ const char * ConsoleController::inputText(const char * prompt) {
|
||||
}
|
||||
|
||||
void ConsoleController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
loadPythonEnvironment();
|
||||
if (m_importScriptsWhenViewAppears) {
|
||||
m_importScriptsWhenViewAppears = false;
|
||||
@@ -322,6 +323,7 @@ bool ConsoleController::textFieldDidFinishEditing(TextField * textField, const c
|
||||
m_inputRunLoopActive = false;
|
||||
return false;
|
||||
}
|
||||
telemetryReportEvent("Console", text);
|
||||
runAndPrintForCommand(text);
|
||||
if (!sandboxIsDisplayed()) {
|
||||
m_selectableTableView.reloadData();
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
void didBecomeFirstResponder() override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
ViewController::DisplayParameter displayParameter() override { return ViewController::DisplayParameter::WantsMaximumSpace; }
|
||||
TELEMETRY_ID("Console");
|
||||
|
||||
// ListViewDataSource
|
||||
int numberOfRows() const override;
|
||||
|
||||
@@ -59,6 +59,7 @@ void EditorController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
void EditorController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
m_editorView.loadSyntaxHighlighter();
|
||||
m_editorView.setCursorLocation(m_editorView.text() + strlen(m_editorView.text()));
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
void viewWillAppear() override;
|
||||
void viewDidDisappear() override;
|
||||
ViewController::DisplayParameter displayParameter() override { return ViewController::DisplayParameter::WantsMaximumSpace; }
|
||||
TELEMETRY_ID("Editor");
|
||||
|
||||
/* TextAreaDelegate */
|
||||
bool textAreaDidReceiveEvent(TextArea * textArea, Ion::Events::Event event) override;
|
||||
|
||||
@@ -80,6 +80,7 @@ void MenuController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
void MenuController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
updateAddScriptRowDisplay();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("Menu");
|
||||
|
||||
/* TableViewDataSource */
|
||||
int numberOfRows() const override;
|
||||
|
||||
@@ -67,6 +67,7 @@ bool ScriptParameterController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
void ScriptParameterController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
m_selectableTableView.reloadData();
|
||||
m_selectableTableView.selectCellAtLocation(0,0);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public:
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void viewWillAppear() override;
|
||||
void didBecomeFirstResponder() override;
|
||||
TELEMETRY_ID("ScriptParameter");
|
||||
|
||||
/* SimpleListViewDataSource */
|
||||
KDCoordinate cellHeight() override { return Metric::ParameterCellHeight; }
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
Snapshot * snapshot() const {
|
||||
return static_cast<Snapshot *>(::App::snapshot());
|
||||
}
|
||||
TELEMETRY_ID("Graph");
|
||||
bool XNTCanBeOverriden() const override { return false; }
|
||||
CodePoint XNT() override;
|
||||
NestedMenuController * variableBoxForInputEventHandler(InputEventHandler * textInput) override;
|
||||
|
||||
@@ -19,6 +19,7 @@ CalculationGraphController::CalculationGraphController(Responder * parentRespond
|
||||
}
|
||||
|
||||
void CalculationGraphController::viewWillAppear() {
|
||||
Shared::SimpleInteractiveCurveViewController::viewWillAppear();
|
||||
assert(!m_record.isNull());
|
||||
Coordinate2D<double> pointOfInterest = computeNewPointOfInterestFromAbscissa(m_graphRange->xMin(), 1);
|
||||
if (std::isnan(pointOfInterest.x1())) {
|
||||
|
||||
@@ -33,6 +33,7 @@ View * CalculationParameterController::view() {
|
||||
}
|
||||
|
||||
void CalculationParameterController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
m_selectableTableView.reloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void viewWillAppear() override;
|
||||
void didBecomeFirstResponder() override;
|
||||
TELEMETRY_ID("CalculationParameter");
|
||||
int numberOfRows() const override;
|
||||
KDCoordinate rowHeight(int j) override;
|
||||
HighlightCell * reusableCell(int index, int type) override;
|
||||
|
||||
@@ -77,6 +77,7 @@ int CurveParameterController::reusableCellCount() const {
|
||||
}
|
||||
|
||||
void CurveParameterController::viewWillAppear() {
|
||||
Shared::FunctionCurveParameterController::viewWillAppear();
|
||||
m_selectableTableView.reloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ class MinimumGraphController : public CalculationGraphController {
|
||||
public:
|
||||
MinimumGraphController(Responder * parentResponder, GraphView * graphView, BannerView * bannerView, Shared::InteractiveCurveViewRange * curveViewRange, Shared::CurveViewCursor * cursor);
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Minimum");
|
||||
private:
|
||||
Poincare::Coordinate2D<double> computeNewPointOfInterest(double start, double step, double max, Poincare::Context * context) override;
|
||||
};
|
||||
@@ -17,6 +18,7 @@ class MaximumGraphController : public CalculationGraphController {
|
||||
public:
|
||||
MaximumGraphController(Responder * parentResponder, GraphView * graphView, BannerView * bannerView, Shared::InteractiveCurveViewRange * curveViewRange, Shared::CurveViewCursor * cursor);
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Maximum");
|
||||
private:
|
||||
Poincare::Coordinate2D<double> computeNewPointOfInterest(double start, double step, double max, Poincare::Context * context) override;
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@ class RootGraphController : public CalculationGraphController {
|
||||
public:
|
||||
RootGraphController(Responder * parentResponder, GraphView * graphView, BannerView * bannerView, Shared::InteractiveCurveViewRange * curveViewRange, Shared::CurveViewCursor * cursor);
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Root");
|
||||
private:
|
||||
Poincare::Coordinate2D<double> computeNewPointOfInterest(double start, double step, double max, Poincare::Context * context) override;
|
||||
};
|
||||
|
||||
@@ -23,6 +23,7 @@ const char * TangentGraphController::title() {
|
||||
}
|
||||
|
||||
void TangentGraphController::viewWillAppear() {
|
||||
Shared::SimpleInteractiveCurveViewController::viewWillAppear();
|
||||
m_graphRange->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
m_graphView->drawTangent(true);
|
||||
m_graphView->setOkView(nullptr);
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
const char * title() override;
|
||||
void viewWillAppear() override;
|
||||
void didBecomeFirstResponder() override;
|
||||
TELEMETRY_ID("Tangent");
|
||||
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
|
||||
void setRecord(Ion::Storage::Record record);
|
||||
private:
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
|
||||
// ViewController
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("DomainParameter");
|
||||
|
||||
// ListViewDataSource
|
||||
int numberOfRows() const override;
|
||||
|
||||
@@ -42,6 +42,7 @@ const char * TypeParameterController::title() {
|
||||
}
|
||||
|
||||
void TypeParameterController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
App * myApp = App::app();
|
||||
assert(!m_record.isNull());
|
||||
Shared::ExpiringPointer<Shared::ContinuousFunction> function = myApp->functionStore()->modelForRecord(m_record);
|
||||
|
||||
@@ -21,6 +21,7 @@ public:
|
||||
const char * title() override;
|
||||
View * view() override { return &m_selectableTableView; }
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("TypeParameter");
|
||||
|
||||
// ListViewDataSource
|
||||
int numberOfRows() const override { return k_numberOfTypes; }
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
Snapshot * snapshot() const {
|
||||
return static_cast<Snapshot *>(::App::snapshot());
|
||||
}
|
||||
TELEMETRY_ID("Home");
|
||||
private:
|
||||
App(Snapshot * snapshot);
|
||||
Controller m_controller;
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
return static_cast<App *>(Container::activeApp());
|
||||
}
|
||||
Snapshot * snapshot() const { return static_cast<Snapshot *>(::App::snapshot()); }
|
||||
TELEMETRY_ID("Probability");
|
||||
private:
|
||||
App(Snapshot * snapshot);
|
||||
CalculationController m_calculationController;
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
const char * title() override;
|
||||
void viewWillAppear() override;
|
||||
void viewDidDisappear() override;
|
||||
TELEMETRY_ID("Calculation");
|
||||
|
||||
/* TableViewDataSource */
|
||||
int numberOfRows() const override;
|
||||
|
||||
@@ -72,6 +72,7 @@ DistributionController::DistributionController(Responder * parentResponder, Dist
|
||||
}
|
||||
|
||||
void Probability::DistributionController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
selectRow((int)m_distribution->type());
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("Distribution");
|
||||
int numberOfRows() const override { return k_totalNumberOfModels; }
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
KDCoordinate cellHeight() override { return k_cellHeight; }
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
void reinitCalculation();
|
||||
void didBecomeFirstResponder() override;
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("Parameters");
|
||||
int numberOfRows() const override;
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
private:
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
static App * app() {
|
||||
return static_cast<App *>(Container::activeApp());
|
||||
}
|
||||
TELEMETRY_ID("Regression");
|
||||
RegressionController * regressionController() { return &m_regressionController; }
|
||||
private:
|
||||
App(Snapshot * snapshot, Poincare::Context * parentContext);
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
|
||||
// View Controller
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Calculation");
|
||||
|
||||
// Responder
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
// ViewController
|
||||
const char * title() override;
|
||||
View * view() override { return &m_selectableTableView; }
|
||||
TELEMETRY_ID("Regression");
|
||||
|
||||
// Responder
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
Snapshot * snapshot() const {
|
||||
return static_cast<Snapshot *>(::App::snapshot());
|
||||
}
|
||||
TELEMETRY_ID("Sequence");
|
||||
// TODO: override variableBoxForInputEventHandler to lock sequence in the variable box once they appear there
|
||||
// NestedMenuController * variableBoxForInputEventHandler(InputEventHandler * textInput) override;
|
||||
CodePoint XNT() override { return 'n'; }
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
App * unpack(Container * container) override;
|
||||
Descriptor * descriptor() override;
|
||||
};
|
||||
TELEMETRY_ID("Settings");
|
||||
private:
|
||||
App(Snapshot * snapshot);
|
||||
MainController m_mainController;
|
||||
|
||||
@@ -206,6 +206,7 @@ void MainController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
}
|
||||
|
||||
void MainController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
m_selectableTableView.reloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
int typeAtLocation(int i, int j) override;
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("");
|
||||
private:
|
||||
constexpr static int k_indexOfMathOptionsChildren = 0;
|
||||
constexpr static int k_indexOfBrightnessCell = k_indexOfMathOptionsChildren + 1;
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
//View * view() override { return &m_view; }
|
||||
View * view() override { return &m_selectableTableView; }
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("About");
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
HighlightCell * reusableCell(int index, int type) override;
|
||||
int reusableCellCount(int type) override;
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace Settings {
|
||||
class DisplayModeController : public PreferencesController, public Shared::ParameterTextFieldDelegate {
|
||||
public:
|
||||
DisplayModeController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate);
|
||||
TELEMETRY_ID("DisplayMode");
|
||||
KDCoordinate rowHeight(int j) override;
|
||||
KDCoordinate cumulatedHeightFromIndex(int j) override;
|
||||
int indexFromCumulatedHeight(KDCoordinate offsetY) override;
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
ExamModeController(Responder * parentResponder);
|
||||
View * view() override { return &m_contentView; }
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
TELEMETRY_ID("ExamMode");
|
||||
void didEnterResponderChain(Responder * previousFirstResponder) override;
|
||||
int numberOfRows() const override;
|
||||
HighlightCell * reusableCell(int index, int type) override;
|
||||
|
||||
@@ -27,6 +27,7 @@ void GenericSubController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
void GenericSubController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
/* This can't be done in didEnterResponderChain because we don't want it to
|
||||
* be done everytime the pop-up disappears. For example, if we are editing a
|
||||
* field and a pop-up shows up with a warning, we don't want to reload the
|
||||
|
||||
@@ -10,6 +10,7 @@ class LanguageController : public Shared::LanguageController {
|
||||
public:
|
||||
using Shared::LanguageController::LanguageController;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
TELEMETRY_ID("Language");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
int reusableCellCount(int type) override;
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
KDCoordinate rowHeight(int j) override;
|
||||
TELEMETRY_ID("Other");
|
||||
protected:
|
||||
constexpr static int k_totalNumberOfCell = 7;
|
||||
int initialSelectedRow() const override { return valueIndexForPreference(m_messageTreeModel->label()); }
|
||||
|
||||
@@ -244,6 +244,7 @@ void ExpressionModelListController::editExpression(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
bool ExpressionModelListController::editSelectedRecordWithText(const char * text) {
|
||||
telemetryReportEvent("Edit", text);
|
||||
// Reset memoization of the selected cell which always corresponds to the k_memoizedCellsCount/2 memoized cell
|
||||
resetMemoizationForIndex(k_memoizedCellsCount/2);
|
||||
Ion::Storage::Record record = modelStore()->recordAtIndex(modelIndexForRow(selectedRow()));
|
||||
|
||||
@@ -34,6 +34,7 @@ void FloatParameterController<T>::didBecomeFirstResponder() {
|
||||
|
||||
template<typename T>
|
||||
void FloatParameterController<T>::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
if (selectedRow() == -1 || selectedRow() == numberOfRows()-1) {
|
||||
selectCellAtLocation(0, 0);
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,7 @@ class FunctionCurveParameterController : public ViewController, public SimpleLis
|
||||
public:
|
||||
FunctionCurveParameterController();
|
||||
View * view() override { return &m_selectableTableView; }
|
||||
TELEMETRY_ID("CurveParameter");
|
||||
void didBecomeFirstResponder() override;
|
||||
KDCoordinate cellHeight() override;
|
||||
void setRecord(Ion::Storage::Record record) { m_record = record; }
|
||||
|
||||
@@ -38,6 +38,7 @@ FunctionListController::FunctionListController(Responder * parentResponder, Butt
|
||||
/* TableViewDataSource */
|
||||
|
||||
void FunctionListController::viewWillAppear() {
|
||||
ExpressionModelListController::viewWillAppear();
|
||||
computeTitlesColumnWidth();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
|
||||
/* ViewController */
|
||||
void viewWillAppear() override;
|
||||
TELEMETRY_ID("List");
|
||||
|
||||
/* TableViewDataSource */
|
||||
int numberOfRows() const override { return this->numberOfExpressionRows(); }
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
{}
|
||||
View * view() override;
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Initialization");
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
int numberOfRows() const override;
|
||||
|
||||
@@ -133,6 +133,7 @@ Responder * InteractiveCurveViewController::defaultController() {
|
||||
}
|
||||
|
||||
void InteractiveCurveViewController::viewWillAppear() {
|
||||
SimpleInteractiveCurveViewController::viewWillAppear();
|
||||
uint32_t newModelVersion = modelVersion();
|
||||
if (*m_modelVersion != newModelVersion) {
|
||||
if (*m_modelVersion == 0 || numberOfCurves() == 1 || shouldSetDefaultOnModelChange()) {
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
const char * title() override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
TELEMETRY_ID("Graph");
|
||||
|
||||
ViewController * rangeParameterController();
|
||||
ViewController * zoomParameterController();
|
||||
|
||||
@@ -35,6 +35,7 @@ void LanguageController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
void LanguageController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
resetSelection();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
View * view() override { return &m_selectableTableView; }
|
||||
const char * title() override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
TELEMETRY_ID("ListParameter");
|
||||
void setRecord(Ion::Storage::Record record);
|
||||
void didBecomeFirstResponder() override;
|
||||
void viewWillAppear() override;
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
TELEMETRY_ID("Range");
|
||||
private:
|
||||
class MessageTableCellWithConvertibleEditableText : public MessageTableCellWithEditableText {
|
||||
public:
|
||||
|
||||
@@ -16,6 +16,7 @@ class StoreController : public EditableCellTableViewController, public ButtonRow
|
||||
public:
|
||||
StoreController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, DoublePairStore * store, ButtonRowController * header);
|
||||
View * view() override { return &m_contentView; }
|
||||
TELEMETRY_ID("Store");
|
||||
|
||||
virtual StoreContext * storeContext() = 0;
|
||||
void displayFormulaInput();
|
||||
|
||||
@@ -26,6 +26,7 @@ SumGraphController::SumGraphController(Responder * parentResponder, InputEventHa
|
||||
}
|
||||
|
||||
void SumGraphController::viewWillAppear() {
|
||||
SimpleInteractiveCurveViewController::viewWillAppear();
|
||||
m_graphRange->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
|
||||
m_graphView->setBannerView(&m_legendView);
|
||||
m_graphView->setCursorView(&m_cursorView);
|
||||
|
||||
@@ -18,6 +18,7 @@ public:
|
||||
void viewWillAppear() override;
|
||||
void didEnterResponderChain(Responder * previousFirstResponder) override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
TELEMETRY_ID("Sum");
|
||||
void setRecord(Ion::Storage::Record record);
|
||||
bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
|
||||
protected:
|
||||
|
||||
@@ -12,6 +12,7 @@ void TabTableController::didBecomeFirstResponder() {
|
||||
}
|
||||
|
||||
void TabTableController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
selectableTableView()->reloadData();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
const char * title() override;
|
||||
void viewWillAppear() override;
|
||||
void viewDidDisappear() override;
|
||||
TELEMETRY_ID("Values");
|
||||
|
||||
// Responder
|
||||
virtual bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
@@ -55,6 +55,7 @@ bool ZoomParameterController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
void ZoomParameterController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
m_contentView.curveView()->setOkView(nullptr);
|
||||
/* We need to change the curve range to keep the same visual aspect of the
|
||||
* view. */
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
void viewWillAppear() override;
|
||||
void viewDidDisappear() override;
|
||||
void didBecomeFirstResponder() override;
|
||||
TELEMETRY_ID("Zoom");
|
||||
private:
|
||||
constexpr static KDCoordinate k_standardViewHeight = 175;
|
||||
class ContentView : public View {
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
ViewController * intervalController() { return &m_intervalController; }
|
||||
SolutionsController * solutionsController() { return &m_solutionsController; }
|
||||
void willBecomeInactive() override;
|
||||
TELEMETRY_ID("Solver");
|
||||
private:
|
||||
App(Snapshot * snapshot);
|
||||
SolutionsController m_solutionsController;
|
||||
|
||||
@@ -12,6 +12,7 @@ public:
|
||||
IntervalController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, EquationStore * equationStore);
|
||||
const char * title() override;
|
||||
View * view() override { return &m_contentView; }
|
||||
TELEMETRY_ID("Interval");
|
||||
int numberOfRows() const override;
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
private:
|
||||
|
||||
@@ -37,6 +37,7 @@ public:
|
||||
bool editSelectedRecordWithText(const char * text) override { return Shared::ExpressionModelListController::editSelectedRecordWithText(text); }
|
||||
/* ViewController */
|
||||
View * view() override { return &m_equationListView; }
|
||||
TELEMETRY_ID("List");
|
||||
/* Text/Layout Field Delegate */
|
||||
bool textFieldDidReceiveEvent(TextField * textField, Ion::Events::Event event) override;
|
||||
bool layoutFieldDidReceiveEvent(LayoutField * layoutField, Ion::Events::Event event) override;
|
||||
|
||||
@@ -19,6 +19,8 @@ public:
|
||||
void viewWillAppear() override;
|
||||
void viewDidDisappear() override;
|
||||
void didEnterResponderChain(Responder * previousFirstResponder) override;
|
||||
TELEMETRY_ID("Solutions");
|
||||
|
||||
/* AlternateEmptyViewDefaultDelegate */
|
||||
bool isEmpty() const override;
|
||||
virtual I18n::Message emptyMessage() override;
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
int m_selectedBoxSeriesIndex;
|
||||
BoxView::Quantile m_selectedBoxQuantile;
|
||||
};
|
||||
TELEMETRY_ID("Statistics");
|
||||
private:
|
||||
App(Snapshot * snapshot, Poincare::Context * parentContext);
|
||||
CalculationController m_calculationController;
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
|
||||
// ViewController
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Box");
|
||||
private:
|
||||
Responder * tabController() const override;
|
||||
void reloadBannerView() override;
|
||||
|
||||
@@ -37,6 +37,7 @@ public:
|
||||
|
||||
// ViewController
|
||||
const char * title() override;
|
||||
TELEMETRY_ID("Calculation");
|
||||
|
||||
// Responder
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
@@ -21,6 +21,7 @@ public:
|
||||
const char * title() override;
|
||||
void viewWillAppear() override;
|
||||
MultipleDataView * multipleDataView() override { return &m_view; }
|
||||
TELEMETRY_ID("Histogram");
|
||||
|
||||
// Responder
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
@@ -27,6 +27,7 @@ Responder * MultipleDataViewController::defaultController() {
|
||||
}
|
||||
|
||||
void MultipleDataViewController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
if (*m_selectedSeriesIndex < 0 || m_store->sumOfOccurrences(*m_selectedSeriesIndex) == 0) {
|
||||
*m_selectedSeriesIndex = multipleDataView()->seriesOfSubviewAtIndex(0);
|
||||
}
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
PLATFORM ?= device
|
||||
DEBUG ?= 0
|
||||
|
||||
include build/defaults.mak
|
||||
include build/platform.$(PLATFORM).mak
|
||||
|
||||
EPSILON_VERSION ?= 13.0.0
|
||||
EPSILON_CUSTOM_VERSION ?= 1.19.0-0
|
||||
# USERNAME ?= N/A
|
||||
# Valid values are "none", "update", "beta"
|
||||
EPSILON_APPS ?= calculation rpn graph code statistics probability solver atom sequence regression settings external
|
||||
EPSILON_I18N ?= en fr es de pt hu
|
||||
# EPSILON_I18N ?= en fr es de pt hu
|
||||
EPSILON_GETOPT ?= 0
|
||||
EPSILON_TELEMETRY ?= 0
|
||||
ESCHER_LOG_EVENTS_BINARY ?= 0
|
||||
OMEGA_THEME ?= omega_light
|
||||
|
||||
include build/defaults.mak
|
||||
include build/platform.$(PLATFORM).mak
|
||||
|
||||
ifndef USE_LIBA
|
||||
$(error platform.mak should define USE_LIBA)
|
||||
endif
|
||||
@@ -30,4 +30,5 @@ ifdef USERNAME
|
||||
SFLAGS += -DUSERNAME="$(USERNAME)"
|
||||
endif
|
||||
SFLAGS += -DEPSILON_GETOPT=$(EPSILON_GETOPT)
|
||||
SFLAGS += -DEPSILON_TELEMETRY=$(EPSILON_TELEMETRY)
|
||||
SFLAGS += -DESCHER_LOG_EVENTS_BINARY=$(ESCHER_LOG_EVENTS_BINARY)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
TOOLCHAIN = android
|
||||
EXE = so
|
||||
|
||||
EPSILON_TELEMETRY ?= 1
|
||||
|
||||
ifdef NDK_ABI
|
||||
BUILD_DIR := $(BUILD_DIR)/$(NDK_ABI)
|
||||
endif
|
||||
|
||||
@@ -3,6 +3,7 @@ EXE = bin
|
||||
|
||||
APPLE_PLATFORM ?= ios
|
||||
APPLE_PLATFORM_MIN_VERSION = 8.0
|
||||
EPSILON_TELEMETRY ?= 1
|
||||
|
||||
ifeq ($(APPLE_PLATFORM),ios)
|
||||
ARCHS ?= arm64 armv7
|
||||
|
||||
@@ -26,6 +26,11 @@ $(eval $(call rule_for, \
|
||||
$$(CC) $$(CFLAGS) $$(SFLAGS) -c $$< -o $$@ \
|
||||
))
|
||||
|
||||
$(eval $(call rule_for, \
|
||||
OCC, %.o, %.mm, \
|
||||
$$(CXX) $$(CXXFLAGS) $$(SFLAGS) -c $$< -o $$@ \
|
||||
))
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Work around command-line length limit
|
||||
# On Msys2 the max command line is 32 000 characters. Our standard LD command
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <escher/warning_controller.h>
|
||||
#include <ion/storage.h>
|
||||
#include <poincare/context.h>
|
||||
#include <escher/telemetry.h>
|
||||
|
||||
/* An app is fed events and outputs drawing calls.
|
||||
*
|
||||
@@ -70,6 +71,9 @@ public:
|
||||
virtual int numberOfTimers() { return 0; }
|
||||
virtual Timer * timerAtIndex(int i) { assert(false); return nullptr; }
|
||||
virtual Poincare::Context * localContext() { return nullptr; }
|
||||
#if EPSILON_TELEMETRY
|
||||
virtual const char * telemetryId() const { return nullptr; }
|
||||
#endif
|
||||
protected:
|
||||
App(Snapshot * snapshot, ViewController * rootViewController, I18n::Message warningMessage = (I18n::Message)0) :
|
||||
Responder(nullptr),
|
||||
|
||||
10
escher/include/escher/telemetry.h
Normal file
10
escher/include/escher/telemetry.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef ESCHER_TELEMETRY_H
|
||||
#define ESCHER_TELEMETRY_H
|
||||
|
||||
#if EPSILON_TELEMETRY
|
||||
#define TELEMETRY_ID(x) const char * telemetryId() const override { return (x); }
|
||||
#else
|
||||
#define TELEMETRY_ID(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <kandinsky.h>
|
||||
#include <escher/i18n.h>
|
||||
#include <escher/telemetry.h>
|
||||
extern "C" {
|
||||
#include <stdint.h>
|
||||
}
|
||||
@@ -44,13 +45,20 @@ public:
|
||||
/* With WantsMaximumSpace, no stack headers are displayed. */
|
||||
};
|
||||
|
||||
ViewController(Responder * parentResponder);
|
||||
virtual const char * title();
|
||||
ViewController(Responder * parentResponder) : Responder(parentResponder) {}
|
||||
virtual const char * title() { return nullptr; }
|
||||
virtual View * view() = 0;
|
||||
virtual void initView() {}
|
||||
virtual void viewWillAppear();
|
||||
virtual void viewDidDisappear();
|
||||
virtual void viewDidDisappear() {}
|
||||
virtual DisplayParameter displayParameter() { return DisplayParameter::Default; }
|
||||
protected:
|
||||
#if EPSILON_TELEMETRY
|
||||
virtual const char * telemetryId() const { return nullptr; }
|
||||
void telemetryReportEvent(const char * action, const char * label) const;
|
||||
#else
|
||||
void telemetryReportEvent(const char * action, const char * label) const {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,17 +1,40 @@
|
||||
#include <escher/view_controller.h>
|
||||
|
||||
ViewController::ViewController(Responder * parentResponder) :
|
||||
Responder(parentResponder)
|
||||
{
|
||||
}
|
||||
|
||||
const char * ViewController::title() {
|
||||
return nullptr;
|
||||
}
|
||||
#include <escher/container.h>
|
||||
#include <string.h>
|
||||
#include <ion/telemetry.h>
|
||||
|
||||
void ViewController::viewWillAppear() {
|
||||
#if EPSILON_TELEMETRY
|
||||
const char * screenId = telemetryId();
|
||||
if (screenId == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
const char * appId = Container::activeApp()->telemetryId();
|
||||
if (appId == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
char reportedName[64];
|
||||
assert(strlen(appId) + 1 + strlen(screenId) < sizeof(reportedName));
|
||||
|
||||
reportedName[0] = 0;
|
||||
strlcat(reportedName, appId, sizeof(reportedName));
|
||||
if (strlen(screenId) > 0) {
|
||||
strlcat(reportedName, ".", sizeof(reportedName));
|
||||
strlcat(reportedName, screenId, sizeof(reportedName));
|
||||
}
|
||||
|
||||
Ion::Telemetry::reportScreen(reportedName);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ViewController::viewDidDisappear() {
|
||||
#if EPSILON_TELEMETRY
|
||||
void ViewController::telemetryReportEvent(const char * action, const char * label) const {
|
||||
const char * category = Container::activeApp()->telemetryId();
|
||||
assert(category != nullptr);
|
||||
assert(action != nullptr);
|
||||
assert(label != nullptr);
|
||||
Ion::Telemetry::reportEvent(category, action, label);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@ void writeChar(char c);
|
||||
char readChar();
|
||||
|
||||
// The lines are NULL-terminated
|
||||
void writeLine(const char * line);
|
||||
void writeLine(const char * line, bool appendCRLF = true);
|
||||
void readLine(char * line, int maxLineLength);
|
||||
bool transmissionDone();
|
||||
|
||||
|
||||
13
ion/include/ion/telemetry.h
Normal file
13
ion/include/ion/telemetry.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef ION_TELEMETRY_H
|
||||
#define ION_TELEMETRY_H
|
||||
|
||||
namespace Ion {
|
||||
namespace Telemetry {
|
||||
|
||||
void reportScreen(const char * screenName);
|
||||
void reportEvent(const char * category, const char * action, const char * label);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -12,6 +12,10 @@ ion_src += $(addprefix ion/src/shared/, \
|
||||
events_modifier.cpp \
|
||||
)
|
||||
|
||||
ifeq ($(EPSILON_TELEMETRY),1)
|
||||
ion_src += ion/src/shared/telemetry_console.cpp
|
||||
endif
|
||||
|
||||
# If you need to benchmark execution, you can replace events_keyboard with
|
||||
# events_benchmark.
|
||||
# If you need to profile execution, you can replace events_keyboard with
|
||||
|
||||
@@ -7,12 +7,14 @@ char readChar();
|
||||
void writeChar(char c);
|
||||
bool transmissionDone();
|
||||
|
||||
void writeLine(const char * line) {
|
||||
void writeLine(const char * line, bool appendCRLF) {
|
||||
while (*line != 0) {
|
||||
writeChar(*line++);
|
||||
}
|
||||
writeChar('\r');
|
||||
writeChar('\n');
|
||||
if (appendCRLF) {
|
||||
writeChar('\r');
|
||||
writeChar('\n');
|
||||
}
|
||||
while (!transmissionDone()) {
|
||||
}
|
||||
}
|
||||
|
||||
16
ion/src/shared/telemetry_console.cpp
Normal file
16
ion/src/shared/telemetry_console.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <ion/console.h>
|
||||
#include <ion/telemetry.h>
|
||||
|
||||
void Ion::Telemetry::reportScreen(const char * screenName) {
|
||||
Console::writeLine("TelemetryScreen: ", false);
|
||||
Console::writeLine(screenName);
|
||||
}
|
||||
|
||||
void Ion::Telemetry::reportEvent(const char * category, const char * action, const char * label) {
|
||||
Console::writeLine("TelemetryEvent: ", false);
|
||||
Console::writeLine(category, false);
|
||||
Console::writeLine(", ", false);
|
||||
Console::writeLine(action, false);
|
||||
Console::writeLine(", ", false);
|
||||
Console::writeLine(label);
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
17
ion/src/simulator/android/.project
Normal file
17
ion/src/simulator/android/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>android</name>
|
||||
<comment>Project android created by Buildship.</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,2 @@
|
||||
connection.project.dir=
|
||||
eclipse.preferences.version=1
|
||||
@@ -7,6 +7,10 @@ ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
dummy/language.cpp \
|
||||
)
|
||||
|
||||
ifeq ($(EPSILON_TELEMETRY),1)
|
||||
ion_src += ion/src/simulator/android/src/cpp/telemetry.cpp
|
||||
endif
|
||||
|
||||
$(call object_for,ion/src/simulator/shared/main.cpp) : SFLAGS += -DEPSILON_SDL_FULLSCREEN=1
|
||||
|
||||
LDFLAGS += -ljnigraphics -llog
|
||||
|
||||
@@ -9,8 +9,7 @@ ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
|
||||
$(call object_for,ion/src/simulator/shared/main.cpp) : SFLAGS += -DEPSILON_SDL_FULLSCREEN=1
|
||||
|
||||
GOOGLE_ANALYTICS ?= 1
|
||||
ifeq ($(GOOGLE_ANALYTICS),1)
|
||||
ifeq ($(EPSILON_TELEMETRY),1)
|
||||
# Display a nice error if the Google Analytics SDK is not installed
|
||||
$(call object_for,ion/src/simulator/ios/telemetry.m): ion/src/simulator/ios/GoogleAnalyticsServices/GoogleAnalytics/Library/GAI.h
|
||||
ion/src/simulator/ios/GoogleAnalyticsServices/GoogleAnalytics/Library/GAI.h:
|
||||
@@ -25,8 +24,6 @@ LDFLAGS += -lz
|
||||
LDFLAGS += -framework SystemConfiguration
|
||||
LDFLAGS += -framework CoreData
|
||||
LDFLAGS += -Lion/src/simulator/ios/GoogleAnalyticsServices
|
||||
else
|
||||
ion_src += ion/src/simulator/shared/dummy/telemetry.cpp
|
||||
endif
|
||||
|
||||
# App resources
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#include "../shared/platform.h"
|
||||
|
||||
#import <GAI.h>
|
||||
#import <GAIDictionaryBuilder.h>
|
||||
#import <GAIFields.h>
|
||||
|
||||
void IonSimulatorTelemetryInit() {
|
||||
[[GAI sharedInstance] trackerWithTrackingId:@"UA-93775823-3"];
|
||||
}
|
||||
|
||||
void IonSimulatorTelemetryEvent(const char * eventName) {
|
||||
id<GAITracker> tracker = [GAI sharedInstance].defaultTracker;
|
||||
[tracker set:kGAIScreenName value:[NSString stringWithUTF8String:eventName]];
|
||||
[tracker send:[[GAIDictionaryBuilder createScreenView] build]];
|
||||
}
|
||||
|
||||
void IonSimulatorTelemetryDeinit() {
|
||||
}
|
||||
49
ion/src/simulator/ios/telemetry.mm
Normal file
49
ion/src/simulator/ios/telemetry.mm
Normal file
@@ -0,0 +1,49 @@
|
||||
#include "../shared/telemetry.h"
|
||||
|
||||
#import <GAI.h>
|
||||
#import <GAIDictionaryBuilder.h>
|
||||
#import <GAIFields.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Simulator {
|
||||
namespace Telemetry {
|
||||
|
||||
void init() {
|
||||
[[GAI sharedInstance] trackerWithTrackingId:@"UA-93775823-3"];
|
||||
}
|
||||
|
||||
void shutdown() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline NSString * NS(const char * s) {
|
||||
if (s != nullptr) {
|
||||
return [NSString stringWithUTF8String:s];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Ion {
|
||||
namespace Telemetry {
|
||||
|
||||
void reportScreen(const char * screenName) {
|
||||
id<GAITracker> tracker = [GAI sharedInstance].defaultTracker;
|
||||
[tracker set:kGAIScreenName value:NS(screenName)];
|
||||
[tracker send:[[GAIDictionaryBuilder createScreenView] build]];
|
||||
}
|
||||
|
||||
void reportEvent(const char * category, const char * action, const char * label) {
|
||||
id<GAITracker> tracker = [GAI sharedInstance].defaultTracker;
|
||||
[tracker send:[[GAIDictionaryBuilder
|
||||
createEventWithCategory:NS(category)
|
||||
action:NS(action)
|
||||
label:NS(label)
|
||||
value:nil] build]];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,11 @@ ion_src += $(addprefix ion/src/simulator/linux/, \
|
||||
|
||||
ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
dummy/callback.cpp \
|
||||
dummy/telemetry.cpp \
|
||||
)
|
||||
|
||||
ifeq ($(EPSILON_TELEMETRY),1)
|
||||
ion_src += ion/src/simulator/shared/dummy/telemetry_init.cpp
|
||||
ion_src += ion/src/shared/telemetry_console.cpp
|
||||
endif
|
||||
|
||||
LDFLAGS += -ljpeg
|
||||
|
||||
@@ -5,9 +5,13 @@ ion_src += $(addprefix ion/src/simulator/macos/, \
|
||||
ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
apple/language.m \
|
||||
dummy/callback.cpp \
|
||||
dummy/telemetry.cpp \
|
||||
)
|
||||
|
||||
ifeq ($(EPSILON_TELEMETRY),1)
|
||||
ion_src += ion/src/simulator/shared/dummy/telemetry_init.cpp
|
||||
ion_src += ion/src/shared/telemetry_console.cpp
|
||||
endif
|
||||
|
||||
# App resources
|
||||
|
||||
SIMULATOR_ICON_SIZES = 16x16 32x32 64x64 128x128 256x256 512x512 1024x1024
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#include "../platform.h"
|
||||
|
||||
void IonSimulatorTelemetryInit() {
|
||||
}
|
||||
|
||||
void IonSimulatorTelemetryEvent(const char * eventName) {
|
||||
}
|
||||
|
||||
void IonSimulatorTelemetryDeinit() {
|
||||
}
|
||||
15
ion/src/simulator/shared/dummy/telemetry_init.cpp
Normal file
15
ion/src/simulator/shared/dummy/telemetry_init.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "../platform.h"
|
||||
|
||||
namespace Ion {
|
||||
namespace Simulator {
|
||||
namespace Telemetry {
|
||||
|
||||
void init() {
|
||||
}
|
||||
|
||||
void shutdown() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,10 +209,6 @@ Event getPlatformEvent() {
|
||||
if (event.type == SDL_TEXTINPUT) {
|
||||
return eventFromSDLTextInputEvent(event.text);
|
||||
}
|
||||
if (event.type == SDL_APP_WILLENTERFOREGROUND) {
|
||||
// IonSimulatorTelemetryEvent("Calculator");
|
||||
return None;
|
||||
}
|
||||
}
|
||||
return None;
|
||||
}
|
||||
|
||||
@@ -56,12 +56,9 @@ int main(int argc, char * argv[]) {
|
||||
arguments.push_back(language);
|
||||
}
|
||||
|
||||
// IonSimulatorTelemetryInit();
|
||||
Ion::Simulator::Main::init();
|
||||
// IonSimulatorTelemetryEvent("Calculator");
|
||||
ion_main(arguments.size(), &arguments[0]);
|
||||
Ion::Simulator::Main::quit();
|
||||
// IonSimulatorTelemetryDeinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user