├── .idea ├── .name ├── codeStyles │ └── codeStyleConfig.xml ├── compiler.xml ├── misc.xml └── jarRepositories.xml ├── flx ├── consumer-rules.pro ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ └── java │ │ │ └── org │ │ │ └── fuusio │ │ │ └── flx │ │ │ ├── core │ │ │ ├── type │ │ │ │ ├── ArgModifier.kt │ │ │ │ ├── Collection.kt │ │ │ │ ├── Indexable.kt │ │ │ │ ├── FlxType.kt │ │ │ │ ├── Sequence.kt │ │ │ │ ├── Sizable.kt │ │ │ │ ├── Set.kt │ │ │ │ └── List.kt │ │ │ ├── vm │ │ │ │ ├── ResumeInstructions.kt │ │ │ │ ├── ExceptionObserver.kt │ │ │ │ ├── VmObserver.kt │ │ │ │ ├── SuspensionContext.kt │ │ │ │ └── ExecutionState.kt │ │ │ ├── logger │ │ │ │ ├── LoggerObserver.kt │ │ │ │ ├── LogEntry.kt │ │ │ │ └── LogLevel.kt │ │ │ ├── Else.kt │ │ │ ├── SystemSymbol.kt │ │ │ ├── parser │ │ │ │ ├── ParserStream.kt │ │ │ │ ├── ParserObserver.kt │ │ │ │ └── ParserError.kt │ │ │ ├── Evaluable.kt │ │ │ ├── function │ │ │ │ ├── Function.kt │ │ │ │ ├── FunctionFormSymbol.kt │ │ │ │ ├── FunctionObject.kt │ │ │ │ ├── FunctionSymbol.kt │ │ │ │ └── AbstractFunctionObject.kt │ │ │ ├── error │ │ │ │ ├── FlxException.kt │ │ │ │ ├── EmptyStringException.kt │ │ │ │ ├── ZeroDivisionException.kt │ │ │ │ ├── ArgError.kt │ │ │ │ ├── FlxRuntimeException.kt │ │ │ │ ├── StringFormatException.kt │ │ │ │ ├── InvalidJsonKeyException.kt │ │ │ │ ├── InvalidJsonValueException.kt │ │ │ │ ├── InvalidBundleValueException.kt │ │ │ │ ├── NotCallableException.kt │ │ │ │ ├── InvalidJsonArrayElementException.kt │ │ │ │ ├── UnsupportedJsonException.kt │ │ │ │ ├── ImmutableSymbolException.kt │ │ │ │ ├── MethodNotFoundException.kt │ │ │ │ ├── UninitializedSymbolAccessException.kt │ │ │ │ ├── VarRedefinitionException.kt │ │ │ │ └── ValRedefinitionException.kt │ │ │ ├── Info.kt │ │ │ ├── Callable.kt │ │ │ ├── Variable.kt │ │ │ ├── ConstantSymbol.kt │ │ │ ├── reflection │ │ │ │ └── ReflectionSymbol.kt │ │ │ ├── macro │ │ │ │ └── MacroSymbol.kt │ │ │ ├── util │ │ │ │ ├── Literals.kt │ │ │ │ └── CommonExtensions.kt │ │ │ └── rx │ │ │ │ └── Subscription.kt │ │ │ └── Program.kt │ └── androidTest │ │ └── java │ │ └── org │ │ └── fuusio │ │ └── flx │ │ └── ExampleInstrumentedTest.kt └── proguard-rules.pro ├── app ├── .gitignore ├── src │ ├── main │ │ ├── java │ │ │ ├── org │ │ │ │ └── fuusio │ │ │ │ │ └── api │ │ │ │ │ ├── redux │ │ │ │ │ ├── State.kt │ │ │ │ │ ├── Action.kt │ │ │ │ │ ├── NoopAction.kt │ │ │ │ │ ├── Store.kt │ │ │ │ │ └── Subscription.kt │ │ │ │ │ ├── livedata │ │ │ │ │ ├── StringObservable.kt │ │ │ │ │ ├── BooleanObservable.kt │ │ │ │ │ └── ValueObservable.kt │ │ │ │ │ ├── model │ │ │ │ │ ├── ModelObject.kt │ │ │ │ │ ├── ModelObservable.kt │ │ │ │ │ ├── ModelState.kt │ │ │ │ │ ├── ModelChangeEvent.kt │ │ │ │ │ └── ModelManager.kt │ │ │ │ │ ├── extension │ │ │ │ │ ├── IntExtensions.kt │ │ │ │ │ ├── FragmentExtensions.kt │ │ │ │ │ ├── AnimationExtensions.kt │ │ │ │ │ └── CommonExtensions.kt │ │ │ │ │ ├── util │ │ │ │ │ ├── FileUtils.kt │ │ │ │ │ ├── FileExtensions.kt │ │ │ │ │ ├── DateUtils.kt │ │ │ │ │ └── Uid.kt │ │ │ │ │ ├── component │ │ │ │ │ └── BottomSheetCallback.kt │ │ │ │ │ ├── feature │ │ │ │ │ ├── FeatureManager.kt │ │ │ │ │ └── ViewFeature.kt │ │ │ │ │ ├── view │ │ │ │ │ ├── StackLayout.kt │ │ │ │ │ ├── NoSwipingViewPager.kt │ │ │ │ │ └── ActionButton.kt │ │ │ │ │ └── widget │ │ │ │ │ └── RecyclerViewMargin.kt │ │ │ └── com │ │ │ │ └── flx │ │ │ │ ├── app │ │ │ │ ├── Configuration.kt │ │ │ │ └── model │ │ │ │ │ └── FlxAppState.kt │ │ │ │ ├── features │ │ │ │ ├── start │ │ │ │ │ ├── model │ │ │ │ │ │ └── SplashViewModel.kt │ │ │ │ │ └── view │ │ │ │ │ │ └── StartFragment.kt │ │ │ │ ├── http │ │ │ │ │ ├── model │ │ │ │ │ │ └── NoException.kt │ │ │ │ │ ├── logic │ │ │ │ │ │ └── HttpManager.kt │ │ │ │ │ └── HttpFeature.kt │ │ │ │ ├── repl │ │ │ │ │ ├── model │ │ │ │ │ │ └── ReplViewModel.kt │ │ │ │ │ ├── ReplFeature.kt │ │ │ │ │ └── widget │ │ │ │ │ │ └── FormEditText.kt │ │ │ │ ├── media │ │ │ │ │ ├── MediaFeature.kt │ │ │ │ │ └── logic │ │ │ │ │ │ └── MediaManager.kt │ │ │ │ ├── location │ │ │ │ │ └── LocationFeature.kt │ │ │ │ ├── about │ │ │ │ │ ├── AboutFeature.kt │ │ │ │ │ └── model │ │ │ │ │ │ └── AboutViewModel.kt │ │ │ │ └── eula │ │ │ │ │ └── model │ │ │ │ │ └── EulaViewModel.kt │ │ │ │ ├── api │ │ │ │ └── util │ │ │ │ │ └── FileUtils.kt │ │ │ │ └── util │ │ │ │ └── ConsolePrintStream.kt │ │ └── res │ │ │ ├── raw │ │ │ └── button_click.mp3 │ │ │ ├── font │ │ │ └── oxanium_semi_bold.ttf │ │ │ ├── drawable │ │ │ ├── hilla_logo_64x64.png │ │ │ ├── web_hi_res_512.png │ │ │ ├── hilla_logo_128x128.png │ │ │ ├── hilla_logo_320x320.png │ │ │ ├── hilla_logo_640x640.png │ │ │ ├── img_floxp_widget_logo.png │ │ │ ├── img_user_guide_sample.png │ │ │ ├── img_quickstart_guide_logo.png │ │ │ ├── checked_drawer_item_background.xml │ │ │ ├── bg_logo.xml │ │ │ ├── switch_track.xml │ │ │ ├── ic_stop_white_24dp.xml │ │ │ ├── ic_play_arrow_white_24dp.xml │ │ │ ├── side_nav_bar.xml │ │ │ ├── ic_volume_mute_white_24dp.xml │ │ │ ├── ic_add_white_24dp.xml │ │ │ ├── ic_home_white_24dp.xml │ │ │ ├── ic_pause_white_24dp.xml │ │ │ ├── icx_form_collection_set_white_24dp.xml │ │ │ ├── ic_check_white_24dp.xml │ │ │ ├── ic_chevron_left_white_24dp.xml │ │ │ ├── ic_chevron_right_white_24dp.xml │ │ │ ├── ic_menu_white_24dp.xml │ │ │ ├── ic_warning_white_24dp.xml │ │ │ ├── ic_keyboard_arrow_up_white_24dp.xml │ │ │ ├── ic_arrow_forward_white_24dp.xml │ │ │ ├── ic_first_page_white_24dp.xml │ │ │ ├── ic_keyboard_arrow_down_white_24dp.xml │ │ │ ├── ic_last_page_white_24dp.xml │ │ │ ├── ic_send_white_24dp.xml │ │ │ ├── ic_arrow_back_white_24dp.xml │ │ │ ├── ic_arrow_upward_white_24dp.xml │ │ │ ├── ic_arrow_downward_white_24dp.xml │ │ │ ├── ic_delete_white_24dp.xml │ │ │ ├── ic_arrow_right_white_24dp.xml │ │ │ ├── ic_import_export_white_24dp.xml │ │ │ ├── ic_star_white_24dp.xml │ │ │ ├── ic_store_white_24dp.xml │ │ │ ├── ic_margins_white_24dp.xml │ │ │ ├── ic_remove_circle_white_24dp.xml │ │ │ ├── icx_form_collection_array_white_24dp.xml │ │ │ ├── ic_clear_white_24dp.xml │ │ │ ├── ic_close_white_24dp.xml │ │ │ ├── ic_code_white_24dp.xml │ │ │ ├── ic_paddings_white_24dp.xml │ │ │ ├── icx_menu_about.xml │ │ │ ├── seek_bar_thumb_red.xml │ │ │ ├── ic_error_white_24dp.xml │ │ │ ├── ic_info_white_24dp.xml │ │ │ ├── ic_volume_down_white_24dp.xml │ │ │ ├── seek_bar_thumb_blue.xml │ │ │ ├── seek_bar_thumb_green.xml │ │ │ ├── ic_games_white_24dp.xml │ │ │ ├── ic_list_white_24dp.xml │ │ │ ├── ic_widgets_white_24dp.xml │ │ │ ├── seek_bar_thumb.xml │ │ │ ├── ic_add_circle_white_24dp.xml │ │ │ ├── ic_replay_white_24dp.xml │ │ │ ├── ic_check_box_outline_white_24dp.xml │ │ │ ├── ic_pause_circle_filled_white_24dp.xml │ │ │ ├── icx_project_type_program_white_24dp.xml │ │ │ ├── ic_audiotrack_white_24dp.xml │ │ │ ├── ic_check_circle_white_24dp.xml │ │ │ ├── ic_feedback_white_24dp.xml │ │ │ ├── ic_formatted_text_white_24dp.xml │ │ │ ├── ic_image_white_24dp.xml │ │ │ ├── ic_photo_white_24dp.xml │ │ │ ├── icx_form_collection_set_box_white_24dp.xml │ │ │ ├── ic_add_box_white_24dp.xml │ │ │ ├── ic_folder_open_white_24dp.xml │ │ │ ├── ic_folder_white_24dp.xml │ │ │ ├── icx_widget_size_white_24dp.xml │ │ │ ├── bg_bottom_sheet_dialog_fragment.xml │ │ │ ├── ic_export_white_24dp.xml │ │ │ ├── ic_import_white_24dp.xml │ │ │ ├── ic_options_2_white_24dp.xml │ │ │ ├── ic_redo_white_24dp.xml │ │ │ ├── ic_undo_white_24dp.xml │ │ │ ├── ic_edit_white_24dp.xml │ │ │ ├── ic_input_white_24dp.xml │ │ │ ├── icx_screen_white_24dp.xml │ │ │ ├── ic_content_copy_white_24dp.xml │ │ │ ├── ic_place_white_24dp.xml │ │ │ ├── ic_remove_circle_outline_white_24dp.xml │ │ │ ├── ic_save_white_24dp.xml │ │ │ ├── icx_event_handler_white_24dp.xml │ │ │ ├── icx_export_project_24dp.xml │ │ │ ├── ic_label_outline_white_24dp.xml │ │ │ ├── icx_menu_resources.xml │ │ │ ├── icx_parameter_white_24dp.xml │ │ │ ├── icx_project_open_white_24dp.xml │ │ │ ├── ic_cancel_white_24dp.xml │ │ │ ├── icx_form_collection_array_box_white_24dp.xml │ │ │ ├── ic_error_outline_red_24dp.xml │ │ │ ├── ic_error_outline_white_24dp.xml │ │ │ ├── ic_numbered_list_white_24dp.xml │ │ │ ├── ic_slideshow_white_24dp.xml │ │ │ ├── ic_add_circle_outline_white_24dp.xml │ │ │ ├── ic_backup_white_24dp.xml │ │ │ ├── ic_font_style_white_24dp.xml │ │ │ ├── ic_gallery_white_24dp.xml │ │ │ ├── ic_more_vert_white_24dp.xml │ │ │ ├── switch_on_off_thump.xml │ │ │ ├── ic_cloud_download_white_24dp.xml │ │ │ ├── ic_access_time_white_24dp.xml │ │ │ ├── ic_baseline_event_note_24.xml │ │ │ ├── icx_color_picker_white_24dp.xml │ │ │ ├── ic_mic_white_24dp.xml │ │ │ ├── ic_save_black_24dp.xml │ │ │ ├── ic_tools_white_24dp.xml │ │ │ ├── icx_sort_by_datetime_white_24dp.xml │ │ │ ├── ic_volume_up_white_24dp.xml │ │ │ ├── icx_music_file_white_24dp.xml │ │ │ ├── ic_brush_white_24dp.xml │ │ │ ├── icx_text_alignment_white_24dp.xml │ │ │ ├── ic_notebook_white_24dp.xml │ │ │ ├── ic_block_white_24dp.xml │ │ │ ├── ic_calendar_white_24dp.xml │ │ │ ├── ic_insert_link_white_24dp.xml │ │ │ ├── ic_search_white_24dp.xml │ │ │ ├── icx_code_model_white_24dp.xml │ │ │ ├── icx_expand_less_white_24dp.xml │ │ │ ├── icx_expand_more_white_24dp.xml │ │ │ ├── bg_snackbar.xml │ │ │ ├── ic_baseline_backspace_24.xml │ │ │ ├── ic_content_paste_white_24dp.xml │ │ │ ├── ic_sort_by_alpha_white_24dp.xml │ │ │ ├── icx_form_collection_list_white_24dp.xml │ │ │ ├── ic_zoom_out_white_24dp.xml │ │ │ ├── icx_form_collection_map_white_24dp.xml │ │ │ ├── icx_no_actions_available_24dp.xml │ │ │ ├── icx_sound_folder_white_24dp.xml │ │ │ ├── ic_code_outline_white_24dp.xml │ │ │ ├── ic_user_account_white_24dp.xml │ │ │ ├── ic_zoom_in_white_24dp.xml │ │ │ ├── icx_image_file_white_24dp.xml │ │ │ ├── ic_keyboard_white_24dp.xml │ │ │ ├── icx_form_collection_list_box_white_24dp.xml │ │ │ ├── icx_image_folder_white_24dp.xml │ │ │ ├── icx_widget_gravity_white_24dp.xml │ │ │ ├── ic_extension_white_24dp.xml │ │ │ ├── ic_my_location_white_24dp.xml │ │ │ ├── icx_code_file_white_24dp.xml │ │ │ ├── ic_camera_white_24dp.xml │ │ │ ├── icx_code_folder_white_24dp.xml │ │ │ ├── ic_find_replace_white_24dp.xml │ │ │ ├── ic_volume_off_white_24dp.xml │ │ │ ├── icx_form_collection_map_box_white_24dp.xml │ │ │ ├── ic_baseline_shopping_cart_24.xml │ │ │ ├── ic_share_white_24dp.xml │ │ │ ├── ic_mic_off_white_24dp.xml │ │ │ ├── ic_debug_white_24dp.xml │ │ │ ├── ic_bug_report_white_24dp.xml │ │ │ ├── ic_json_white_24dp.xml │ │ │ ├── ic_content_cut_white_24dp.xml │ │ │ ├── ic_color_white_24dp.xml │ │ │ ├── ic_palette_white_24dp.xml │ │ │ ├── control_background_40dp_material_flx.xml │ │ │ ├── ic_settings_white_24dp.xml │ │ │ ├── ic_android_white_24dp.xml │ │ │ ├── icx_line_actions_24dp.xml │ │ │ └── ic_spinner_caret_flx.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_shortcut.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_shortcut.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_shortcut.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_shortcut.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_shortcut.png │ │ │ ├── values │ │ │ ├── integers.xml │ │ │ ├── colors_feature_repl.xml │ │ │ ├── strings_feature_eula.xml │ │ │ ├── colors_common.xml │ │ │ ├── strings_feature_start.xml │ │ │ ├── strings_feature_about.xml │ │ │ ├── strings.xml │ │ │ └── dimens.xml │ │ │ ├── color │ │ │ ├── drawer_item.xml │ │ │ ├── drawer_item_background.xml │ │ │ ├── dialog_button_color_selector.xml │ │ │ └── control_highlight_material_flx.xml │ │ │ ├── anim │ │ │ └── slide_down.xml │ │ │ ├── layout │ │ │ ├── bottom_sheet_actions.xml │ │ │ ├── action_button.xml │ │ │ ├── eula_acceptance_fragment.xml │ │ │ ├── content_main.xml │ │ │ └── app_bar_main.xml │ │ │ ├── values-night │ │ │ └── colors.xml │ │ │ ├── menu │ │ │ ├── about_fragment_menu.xml │ │ │ └── activity_main_drawer.xml │ │ │ └── navigation │ │ │ └── mobile_navigation.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── flx │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── flx │ │ └── ExampleInstrumentedTest.kt └── proguard-rules.pro ├── images └── screenshot_repl.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── settings.gradle └── README.md /.idea/.name: -------------------------------------------------------------------------------- 1 | Hilla -------------------------------------------------------------------------------- /flx/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /flx/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/redux/State.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.redux 2 | 3 | interface State -------------------------------------------------------------------------------- /images/screenshot_repl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/images/screenshot_repl.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/raw/button_click.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/raw/button_click.mp3 -------------------------------------------------------------------------------- /app/src/main/res/font/oxanium_semi_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/font/oxanium_semi_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/drawable/hilla_logo_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/hilla_logo_64x64.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/web_hi_res_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/web_hi_res_512.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-hdpi/ic_shortcut.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-mdpi/ic_shortcut.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-xhdpi/ic_shortcut.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_shortcut.png -------------------------------------------------------------------------------- /flx/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/hilla_logo_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/hilla_logo_128x128.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/hilla_logo_320x320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/hilla_logo_320x320.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/hilla_logo_640x640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/hilla_logo_640x640.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_shortcut.png -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/livedata/StringObservable.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.livedata 2 | 3 | class StringObservable : ValueObservable() -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/model/ModelObject.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.model 2 | 3 | interface ModelObject { 4 | 5 | fun getId(): T 6 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_floxp_widget_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/img_floxp_widget_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_user_guide_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/img_user_guide_sample.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':syntax-java' 2 | include ':syntax-json' 3 | include ':syntax-core' 4 | include ':app', ':flx' 5 | rootProject.name='Hilla' 6 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/extension/IntExtensions.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.extension 2 | 3 | fun Int.hasBits(bitMask: Int) = this and bitMask != 0 -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/livedata/BooleanObservable.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.livedata 2 | 3 | class BooleanObservable : ValueObservable() -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/util/FileUtils.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.util 2 | 3 | const val SCHEME_CONTENT = "content" 4 | const val SCHEME_FILE = "file" -------------------------------------------------------------------------------- /app/src/main/java/com/flx/app/Configuration.kt: -------------------------------------------------------------------------------- 1 | package com.flx.app 2 | 3 | object Configuration { 4 | 5 | fun getMaxProjectsCount(): Int = Int.MAX_VALUE 6 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_quickstart_guide_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fuusio/flx-lisp/HEAD/app/src/main/res/drawable/img_quickstart_guide_logo.png -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/component/BottomSheetCallback.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.component 2 | 3 | interface BottomSheetCallback { 4 | 5 | fun onDismissed() 6 | } -------------------------------------------------------------------------------- /app/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 200 4 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/feature/FeatureManager.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.feature 2 | 3 | import org.koin.core.KoinComponent 4 | 5 | open class FeatureManager : KoinComponent -------------------------------------------------------------------------------- /flx/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | FLX 4 | 5 | Undefined 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/start/model/SplashViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.start.model 2 | 3 | import androidx.lifecycle.ViewModel 4 | 5 | class SplashViewModel : ViewModel() -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/http/model/NoException.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.http.model 2 | 3 | object NoException : Exception() { 4 | 5 | override val message: String? 6 | get() = "No exception" 7 | } -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/repl/model/ReplViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.repl.model 2 | 3 | import androidx.lifecycle.ViewModel 4 | 5 | class ReplViewModel : ViewModel() { 6 | // TODO: Implement the ViewModel 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/checked_drawer_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/color/drawer_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors_feature_repl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @color/red 5 | @color/green 6 | @color/yellow 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 05 23:25:48 EET 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/color/drawer_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_logo.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/switch_track.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_down.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_stop_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_play_arrow_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_volume_mute_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_home_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_pause_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_set_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_left_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_right_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_warning_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/http/logic/HttpManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * All rights reserved. 7 | */ 8 | package com.flx.features.http.logic 9 | 10 | import android.content.Context 11 | import org.fuusio.api.feature.FeatureManager 12 | 13 | class HttpManager(private val context: Context) : FeatureManager() -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_keyboard_arrow_up_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/media/MediaFeature.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.media 2 | 3 | import org.fuusio.api.feature.Feature 4 | import com.flx.features.media.logic.MediaManager 5 | import org.koin.dsl.module 6 | 7 | object MediaFeature : Feature() { 8 | 9 | private val module = module { single { MediaManager(get()) } } 10 | 11 | override fun getFeatureModule() = module 12 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_forward_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_first_page_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_keyboard_arrow_down_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_last_page_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_send_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/livedata/ValueObservable.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.livedata 2 | 3 | import androidx.lifecycle.LiveData 4 | 5 | open class ValueObservable : LiveData() { 6 | 7 | fun get(): T = value!! 8 | 9 | fun set(value: T) { 10 | val currentValue = getValue() 11 | if (currentValue == null || value != currentValue) postValue(value) 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/color/dialog_button_color_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_back_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_upward_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/ArgModifier.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.flx.core.type 2 | 3 | enum class ArgModifier { 4 | OPTIONAL, 5 | REPEATABLE, 6 | REQUIRED, 7 | VARARG; 8 | 9 | fun isOptional() = this == OPTIONAL 10 | 11 | fun isRepeatable() = this == REPEATABLE 12 | 13 | fun isRequired() = this == REQUIRED 14 | 15 | fun isVararg() = this == VARARG 16 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_downward_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/http/HttpFeature.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.http 2 | 3 | import com.flx.features.http.logic.HttpManager 4 | import org.fuusio.api.feature.Feature 5 | import org.koin.dsl.module 6 | 7 | object HttpFeature : Feature() { 8 | 9 | private val module = module { 10 | single { HttpManager(get()) } 11 | } 12 | 13 | override fun getFeatureModule() = module 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_right_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_import_export_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_star_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_store_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_margins_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_remove_circle_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_array_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_clear_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_close_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_code_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_paddings_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_menu_about.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/seek_bar_thumb_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/model/ModelObservable.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.model 2 | 3 | import androidx.lifecycle.LiveData 4 | 5 | class ModelObservable : LiveData() { 6 | 7 | fun get(): T = value!! 8 | 9 | fun set(value: T) { 10 | val currentValue = getValue() 11 | if (currentValue == null || value != currentValue) postValue(value) 12 | } 13 | 14 | fun hasValue() = value != null 15 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_error_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_volume_down_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/seek_bar_thumb_blue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/seek_bar_thumb_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/location/LocationFeature.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.location 2 | 3 | import com.flx.features.location.logic.LocationManager 4 | import org.fuusio.api.feature.Feature 5 | import org.koin.dsl.module 6 | 7 | object LocationFeature : Feature() { 8 | 9 | private val module = module { 10 | single { LocationManager(get()) } 11 | } 12 | 13 | override fun getFeatureModule() = module 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_games_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_list_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_widgets_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/seek_bar_thumb.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_circle_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_replay_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_box_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_pause_circle_filled_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_project_type_program_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/test/java/com/flx/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.flx 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/view/StackLayout.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.view 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.ViewGroup 6 | 7 | class StackLayout(context: Context, attributeSet: AttributeSet? = null) : 8 | ViewGroup(context, attributeSet) { 9 | 10 | override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { 11 | TODO("Not yet implemented") 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_audiotrack_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_check_circle_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_feedback_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_formatted_text_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_image_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_photo_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_set_box_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_box_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_folder_open_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_folder_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_widget_size_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/feature/ViewFeature.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.feature 2 | 3 | import androidx.annotation.IdRes 4 | import androidx.lifecycle.ViewModel 5 | import androidx.lifecycle.ViewModelProvider 6 | import androidx.lifecycle.ViewModelStoreOwner 7 | import org.koin.core.context.GlobalContext 8 | import org.koin.java.KoinJavaComponent.getKoin 9 | import kotlin.reflect.KClass 10 | 11 | abstract class ViewFeature(@IdRes navId: Int) : Feature(navId) 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_bottom_sheet_dialog_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_export_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_import_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_options_2_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_redo_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_undo_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/extension/FragmentExtensions.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.extension 2 | 3 | import androidx.annotation.ColorInt 4 | import androidx.annotation.ColorRes 5 | import androidx.annotation.StringRes 6 | import androidx.fragment.app.Fragment 7 | 8 | @ColorInt fun Fragment.getColor(@ColorRes colorRes: Int): Int { 9 | val context = requireContext() 10 | val resources = context.resources 11 | return resources.getColor(colorRes, context.theme) 12 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_edit_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_input_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_screen_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_content_copy_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_place_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_remove_circle_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_event_handler_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_export_project_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/about/AboutFeature.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.about 2 | 3 | import org.fuusio.api.feature.ViewFeature 4 | import com.flx.lisp.app.R 5 | import com.flx.features.about.model.AboutViewModel 6 | import org.koin.android.viewmodel.dsl.viewModel 7 | import org.koin.dsl.module 8 | 9 | object AboutFeature : ViewFeature(R.id.nav_about) { 10 | 11 | private val module = module { viewModel { AboutViewModel() } } 12 | 13 | override fun getFeatureModule() = module 14 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_label_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_menu_resources.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_parameter_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_project_open_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cancel_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_array_box_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_error_outline_red_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_error_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_numbered_list_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_slideshow_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_circle_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_backup_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_font_style_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_gallery_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_more_vert_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/switch_on_off_thump.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings_feature_eula.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | End User License Agreement 4 | 5 | Accept 6 | Decline 7 | 8 | Exit Application? 9 | Declining the End User Licence Agreement will cause application to exit. 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cloud_download_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_access_time_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_event_note_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_color_picker_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_mic_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_tools_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_sort_by_datetime_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/media/logic/MediaManager.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.media.logic 2 | 3 | import android.content.Context 4 | import android.media.MediaPlayer 5 | import android.net.Uri 6 | import org.fuusio.api.feature.FeatureManager 7 | 8 | class MediaManager(private val appContext: Context) : FeatureManager() { 9 | 10 | fun playAudio(audioUri: Uri): MediaPlayer { 11 | val mediaPlayer = MediaPlayer.create(appContext, audioUri) 12 | mediaPlayer.start() 13 | return mediaPlayer 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/util/FileExtensions.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.util 2 | 3 | const val FILE_EXTENSION_3GP = "3gp" 4 | const val FILE_EXTENSION_FLAC = "flac" 5 | const val FILE_EXTENSION_GIF = "gif" 6 | const val FILE_EXTENSION_JPG = "jpg" 7 | const val FILE_EXTENSION_JSON = "json" 8 | const val FILE_EXTENSION_MP3 = "mp3" 9 | const val FILE_EXTENSION_MP4 = "mp4" 10 | const val FILE_EXTENSION_OGG = "ogg" 11 | const val FILE_EXTENSION_PNG = "png" 12 | const val FILE_EXTENSION_ZIP = "zip" 13 | const val FILE_EXTENSION_WAV = "wav" -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_volume_up_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_music_file_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_brush_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FLX Lisp 2 | 3 | FLX Lisp is simple Lisp implementation written in Kotlin for Android.The Gradle project consists of two modules: 4 | 1. **app**: A REPL that implements a Read-Evel-Print-Loop for FLX Lisp. 5 | 2. **flx**: A library for FLX List implementation. 6 | 7 | [img_app_repl]: https://raw.githubusercontent.com/Fuusio/flx-lisp/main/images/screenshot_repl.png "FLX REPL App" 8 | 9 | ![alt text][img_app_repl] 10 | 11 | FLX Lisp is used in the following application: 12 | 13 | * [FLX - Visual Programming IDE App](https://floxp.app) 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_text_alignment_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/bottom_sheet_actions.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_notebook_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_block_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_calendar_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_insert_link_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_code_model_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_expand_less_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_expand_more_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_snackbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_backspace_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_content_paste_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sort_by_alpha_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_list_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors_common.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #00ffffff 5 | #000000 6 | #ff0000 7 | #00ff00 8 | #0000ff 9 | #ffff00 10 | #ffffff 11 | 12 | #febf00 13 | #fe7f00 14 | #fe3f00 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_zoom_out_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_map_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_no_actions_available_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_sound_folder_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_code_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_user_account_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_zoom_in_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_image_file_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings_feature_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Get started with FLX User Guide? 4 | FLX REPL 5 | FLX User Guide? 6 | 7 | Get started 8 | Okay 9 | Skip 10 | Accept 11 | Decline 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/repl/ReplFeature.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * All rights reserved. 7 | */ 8 | package com.flx.features.repl 9 | 10 | import org.fuusio.api.feature.ViewFeature 11 | import com.flx.lisp.app.R 12 | import com.flx.features.repl.model.ReplViewModel 13 | import org.koin.android.viewmodel.dsl.viewModel 14 | import org.koin.dsl.module 15 | 16 | object ReplFeature : ViewFeature(R.id.nav_repl) { 17 | 18 | private val module = module { viewModel { ReplViewModel() } } 19 | 20 | override fun getFeatureModule() = module 21 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_keyboard_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_list_box_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_image_folder_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/about/model/AboutViewModel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * All rights reserved. 7 | */ 8 | package com.flx.features.about.model 9 | 10 | import androidx.lifecycle.LiveData 11 | import androidx.lifecycle.MutableLiveData 12 | import androidx.lifecycle.ViewModel 13 | import com.flx.app.FlxReplApp 14 | 15 | class AboutViewModel : ViewModel() { 16 | 17 | private val _versionText = MutableLiveData().apply { 18 | value = FlxReplApp.getVersion() 19 | } 20 | 21 | val versionText: LiveData = _versionText 22 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_widget_gravity_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_extension_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_my_location_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_code_file_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/api/util/FileUtils.kt: -------------------------------------------------------------------------------- 1 | package com.flx.api.util 2 | 3 | fun isValidFileName(fileName: String): Boolean { 4 | if (fileName.isBlank()) return false 5 | fileName.forEach { char -> 6 | if (!isValidFatFilenameChar(char)) return false 7 | } 8 | return true 9 | } 10 | 11 | fun isValidFatFilenameChar(char: Char): Boolean { 12 | val byteValue = char.toByte() 13 | return if ((byteValue in 0x00..0x1f) || byteValue == 0x7F.toByte()) { 14 | false 15 | } else { 16 | when (char) { 17 | '"', '*', '/', ':', '<', '>', '?', '\\', '|' -> false 18 | else -> true 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/eula/model/EulaViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.flx.features.eula.model 2 | 3 | import androidx.lifecycle.ViewModel 4 | import com.flx.app.logic.UserInfoManager 5 | import com.flx.model.user.UserInfo 6 | import org.koin.core.KoinComponent 7 | import org.koin.core.inject 8 | 9 | class EulaViewModel : ViewModel(), KoinComponent { 10 | 11 | private val userInfoManager: UserInfoManager by inject() 12 | 13 | fun acceptEula() { 14 | userInfoManager.acceptEula() 15 | } 16 | 17 | fun declineEula() { 18 | userInfoManager.declineEula() 19 | } 20 | 21 | fun getUserInfo(): UserInfo = userInfoManager.userInfo 22 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_camera_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_code_folder_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/util/DateUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * All rights reserved. 7 | */ 8 | package org.fuusio.api.util 9 | 10 | import java.text.SimpleDateFormat 11 | import java.util.* 12 | 13 | object DateUtils { 14 | 15 | const val PATTERN_yyyy_MM_dd = "yyyy-MM-dd" 16 | const val PATTERN_yyyy_MM_dd_HH_mm = "yyyy-MM-dd HH:mm" 17 | const val PATTERN_yyyy_MM_dd_HH_mm_ss = "yyyy-MM-dd HH:mm:ss" 18 | 19 | fun format(date: Date, pattern: String = PATTERN_yyyy_MM_dd_HH_mm): String { 20 | val format = SimpleDateFormat(pattern) 21 | return format.format(date) 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_find_replace_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings_feature_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | About 4 | FLX REPL 5 | Version 6 | OS Libraries: 7 | Copyright 8 | \u00A9 Marko Salmela 2020 - 2023 9 | Send email … 10 | 11 | Goto website 12 | Send feedback 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_volume_off_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_form_collection_map_box_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_shopping_cart_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_share_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_mic_off_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_debug_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bug_report_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/redux/Action.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.redux 19 | 20 | interface Action -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/extension/AnimationExtensions.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.extension 2 | 3 | import android.animation.Animator 4 | import android.view.View 5 | 6 | fun View.fadeIn(duration: Long, listener: Animator.AnimatorListener? = null) { 7 | this.apply { 8 | alpha = 0f 9 | visibility = View.VISIBLE 10 | animate() 11 | .alpha(1f) 12 | .setDuration(duration) 13 | .setListener(listener) 14 | } 15 | } 16 | 17 | fun View.fadeOut(duration: Long, listener: Animator.AnimatorListener? = null) { 18 | this.apply { 19 | alpha = 1f 20 | visibility = View.VISIBLE 21 | animate() 22 | .alpha(0f) 23 | .setDuration(duration) 24 | .setListener(listener) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/flx/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.flx 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("org.fuusio.hilla", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/redux/NoopAction.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.redux 19 | 20 | object NoopAction : Action -------------------------------------------------------------------------------- /app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #455a64 5 | #718792 6 | #1c313a 7 | 8 | #f4511e 9 | #ff844c 10 | #b91400 11 | 12 | #ffffff 13 | #000000 14 | 15 | #60ffffff 16 | 17 | #455a64 18 | 19 | @color/red 20 | 21 | @color/red 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_json_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /flx/src/androidTest/java/org/fuusio/flx/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.flx 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("org.fuusio.flx.test", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_content_cut_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_color_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/vm/ResumeInstructions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.vm 19 | 20 | data class ResumeInstructions(val canContinue: Boolean) -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | -keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | -renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_palette_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/menu/about_fragment_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 18 | -------------------------------------------------------------------------------- /flx/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/logger/LoggerObserver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.logger 19 | 20 | interface LoggerObserver { 21 | 22 | fun onLogEntry(entry: LogEntry) 23 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/widget/RecyclerViewMargin.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.widget 2 | 3 | import android.graphics.Rect 4 | import android.view.View 5 | import androidx.recyclerview.widget.RecyclerView 6 | 7 | class RecyclerViewMargin(private val margin: Int, private val columns: Int = 1) 8 | : RecyclerView.ItemDecoration() { 9 | 10 | init { 11 | require(margin >= 0) 12 | require(columns > 0) 13 | } 14 | 15 | override fun getItemOffsets( 16 | outRect: Rect, 17 | view: View, 18 | parent: RecyclerView, 19 | state: RecyclerView.State 20 | ) { 21 | val position = parent.getChildLayoutPosition(view) 22 | outRect.right = margin 23 | outRect.bottom = margin 24 | if (position < columns) outRect.top = margin 25 | if (position % columns == 0) outRect.left = margin 26 | } 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/Else.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | object Else : EvaluableObject() { 21 | 22 | override fun toString() = NAME_ELSE 23 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/Collection.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | interface Collection : Sizable { 21 | 22 | fun toList(): List 23 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/SystemSymbol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | interface SystemSymbol { 21 | 22 | val name: String 23 | 24 | fun getSpec(): FunctionFormSpec 25 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/model/ModelState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.model 19 | 20 | import org.fuusio.api.redux.State 21 | 22 | interface ModelState : State { 23 | 24 | val uid: Int 25 | } 26 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/parser/ParserStream.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.parser 19 | 20 | interface ParserStream { 21 | 22 | fun hasNext(): Boolean 23 | 24 | fun next(): T 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/Indexable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | interface Indexable : Collection { 21 | 22 | operator fun get(index: Int): Any 23 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/redux/Store.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.redux 19 | 20 | interface Store { 21 | 22 | fun getSubscriber(): Subscriber 23 | 24 | fun setInitialState(state: T) 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/logger/LogEntry.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.logger 19 | 20 | data class LogEntry( 21 | val timeStamp: Long, 22 | val logLevel: LogLevel, 23 | val message: String 24 | ) -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/Evaluable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | interface Evaluable { 23 | 24 | fun eval(ctx: Ctx): Any 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/function/Function.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.function 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | typealias Function = (ctx: Ctx, args: Array, signatureIndex: Int) -> Any 23 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/logger/LogLevel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.logger 19 | 20 | enum class LogLevel(val tag: String) { 21 | INFO("I"), 22 | DEBUG("D"), 23 | WARNING("W"), 24 | ERROR("E") 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/parser/ParserObserver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.parser 19 | 20 | interface ParserObserver { 21 | 22 | fun onNext(parsingResult: Any) 23 | 24 | fun onError(error: ParserError) 25 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/action_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 17 | 18 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/FlxException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | abstract class FlxException(val ctx: Ctx) : IllegalStateException() -------------------------------------------------------------------------------- /app/src/main/java/com/flx/app/model/FlxAppState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.flx.app.model 19 | 20 | import org.fuusio.api.redux.State 21 | import com.flx.model.user.UserInfo 22 | 23 | data class FlxAppState( 24 | val userInfo: UserInfo, 25 | ) : State -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/model/ModelChangeEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.model 19 | 20 | import org.fuusio.api.redux.Action 21 | 22 | data class ModelChangeEvent( 23 | val model: T, 24 | val action: Action 25 | ) -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/Info.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | class Info(val text: String) : EvaluableObject() { 21 | 22 | override fun toString() = toLiteral() 23 | 24 | override fun toLiteral(): String = text 25 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/redux/Subscription.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.redux 19 | 20 | data class Subscription( 21 | val dispatcher: ActionDispatcher, 22 | val getter: StateGetter, 23 | val unsubscriber: Unsubscriber) -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/Callable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | interface Callable : Evaluable { 23 | 24 | fun call(ctx: Ctx, args: Array): Any 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/vm/ExceptionObserver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.vm 19 | 20 | import org.fuusio.flx.core.error.FlxException 21 | 22 | interface ExceptionObserver { 23 | 24 | fun onException(exception: FlxException) 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/Variable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | interface Variable { 23 | 24 | fun get(ctx: Ctx): Any 25 | 26 | fun set(ctx: Ctx, value: Any) 27 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/control_background_40dp_material_flx.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/ConstantSymbol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | class ConstantSymbol(name: String, private val value: Any) : Symbol(name) { 23 | 24 | override fun eval(ctx: Ctx) = value 25 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/function/FunctionFormSymbol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.function 19 | 20 | import org.fuusio.flx.core.Symbol 21 | import org.fuusio.flx.core.SystemSymbol 22 | 23 | abstract class FunctionFormSymbol(name: String) : Symbol(name), SystemSymbol -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/vm/VmObserver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.vm 19 | 20 | interface VmObserver { 21 | 22 | fun onStarted(vm: FlxVM) 23 | 24 | fun onPaused(vm: FlxVM) 25 | 26 | fun onResumed(vm: FlxVM) 27 | 28 | fun onStopped(vm: FlxVM) 29 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/FlxType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | import kotlin.reflect.KClass 21 | 22 | interface FlxType { 23 | 24 | fun getTypeClass(): KClass<*> 25 | 26 | fun getTypeName(): String 27 | 28 | fun isInstance(any: Any): Boolean 29 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/function/FunctionObject.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.function 19 | 20 | import org.fuusio.flx.core.Callable 21 | import org.fuusio.flx.core.Symbol 22 | 23 | interface FunctionObject : Callable { 24 | 25 | val functionName: Symbol? 26 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/Sequence.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | interface Sequence : Indexable { 21 | 22 | fun cons(head: Any): List 23 | 24 | fun first(): Any 25 | 26 | fun last(): Any 27 | 28 | fun rest(): Sequence 29 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_android_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/view/NoSwipingViewPager.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.view 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.Context 5 | import android.util.AttributeSet 6 | import android.view.KeyEvent 7 | import android.view.MotionEvent 8 | import androidx.viewpager.widget.ViewPager 9 | 10 | @Suppress("MemberVisibilityCanBePrivate") 11 | class NoSwipingViewPager(context: Context, attributeSet: AttributeSet) 12 | : ViewPager(context, attributeSet) { 13 | 14 | var isSwipingEnabled = false 15 | 16 | override fun executeKeyEvent(event: KeyEvent) = 17 | if (isSwipingEnabled) super.executeKeyEvent(event) else false 18 | 19 | @SuppressLint("ClickableViewAccessibility") 20 | override fun onTouchEvent(event: MotionEvent) = 21 | if (isSwipingEnabled) super.onTouchEvent(event) else false 22 | 23 | override fun onInterceptTouchEvent(event: MotionEvent) = 24 | if (isSwipingEnabled) super.onInterceptTouchEvent(event) else false 25 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/reflection/ReflectionSymbol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.reflection 19 | 20 | import org.fuusio.flx.core.Symbol 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class ReflectionSymbol(string: String) : Symbol(string) { 24 | 25 | override fun eval(ctx: Ctx): Any = this 26 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/Sizable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | import org.fuusio.flx.core.Evaluable 21 | 22 | interface Sizable : Evaluable { 23 | 24 | fun isEmpty(): Boolean 25 | 26 | fun isNotEmpty(): Boolean 27 | 28 | fun size(): Int 29 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/util/Uid.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.util 19 | 20 | data class Uid(private var nextId: Long = SEED) { 21 | 22 | fun next() = nextId++ 23 | 24 | fun reset() { 25 | nextId = SEED 26 | } 27 | 28 | companion object { 29 | const val SEED: Long = 0xF00510 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/eula_acceptance_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 20 | 21 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/EmptyStringException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | class EmptyStringException(ctx: Ctx) : FlxException(ctx) { 23 | 24 | override val message: String 25 | get() = "Empty string error." 26 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/ZeroDivisionException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | class ZeroDivisionException(ctx: Ctx) : FlxException(ctx) { 23 | 24 | override val message: String 25 | get() = "Divided by zero." 26 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/vm/SuspensionContext.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.vm 19 | 20 | import kotlin.coroutines.Continuation 21 | 22 | data class SuspensionContext( 23 | val ctx: Ctx, 24 | val continuation: Continuation, 25 | val location: String, 26 | val message: String 27 | ) -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/ArgError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.type.FlxType 21 | import kotlin.reflect.KClass 22 | 23 | data class ArgError( 24 | val argIndex: Int, 25 | val argName: String, 26 | val expectedType: FlxType, 27 | val actualType: KClass<*>) -------------------------------------------------------------------------------- /app/src/main/res/navigation/mobile_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | 24 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/parser/ParserError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.parser 19 | 20 | data class ParserError(val code: ParserErrorCode, val description: String) { 21 | 22 | companion object { 23 | fun create(code: ParserErrorCode, vararg args: Any) = ParserError(code, code.formatDescription(*args)) 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/icx_line_actions_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/Program.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx 19 | 20 | import org.fuusio.flx.core.Code 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | open class Program(forms: Array = arrayOf()) : Code(forms) { 24 | 25 | override fun eval(ctx: Ctx): Any { 26 | ctx.program = this 27 | return super.eval(ctx) 28 | } 29 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/function/FunctionSymbol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.function 19 | 20 | import org.fuusio.flx.core.FunctionFormSpec 21 | 22 | class FunctionSymbol(val functionSpec: FunctionFormSpec) 23 | : FunctionFormSymbol(functionSpec.symbol) { 24 | 25 | override fun getSpec() = functionSpec 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/flx/util/ConsolePrintStream.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.flx.util 19 | 20 | import java.io.ByteArrayOutputStream 21 | import java.io.PrintStream 22 | 23 | abstract class ConsolePrintStream() : PrintStream(ByteArrayOutputStream()) { 24 | 25 | abstract override fun print(string: String) 26 | 27 | abstract override fun println(string: String) 28 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/model/ModelManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.model 19 | 20 | import org.fuusio.api.redux.Store 21 | 22 | interface ModelManager : Store { 23 | 24 | fun setInitialModel(model: T) 25 | 26 | fun canRedo(): Boolean 27 | 28 | fun canUndo(): Boolean 29 | 30 | fun redo() 31 | 32 | fun undo() 33 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/macro/MacroSymbol.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.macro 19 | 20 | import org.fuusio.flx.core.FunctionFormSpec 21 | import org.fuusio.flx.core.function.FunctionFormSymbol 22 | 23 | class MacroSymbol(val macroSpec: FunctionFormSpec) : FunctionFormSymbol(macroSpec.symbol) { 24 | 25 | override fun getSpec() = macroSpec 26 | } -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | FLX REPL 6 | Open navigation drawer 7 | Close navigation drawer 8 | FLX REPL 9 | com.floxp 10 | Navigation header 11 | 12 | FLX REPL 13 | About 14 | EULA 15 | 16 | Create 17 | Cancel 18 | OK 19 | Save 20 | Discard 21 | 22 | Confirm 23 | Feature disabled 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 20 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/FlxRuntimeException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | class FlxRuntimeException(ctx: Ctx, private val throwable: Throwable) : FlxException(ctx) { 23 | 24 | override val message: String 25 | get() = "${throwable::class.simpleName} : ${throwable.message}" 26 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/StringFormatException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | class StringFormatException(ctx: Ctx, private val description: String) : FlxException(ctx) { 23 | 24 | override val message: String? 25 | get() = "String format exception: $description" 26 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/extension/CommonExtensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2020 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.api.extension 19 | 20 | import org.koin.java.KoinJavaComponent.getKoin 21 | import kotlin.reflect.KClass 22 | 23 | @Suppress("unused") 24 | val Any?.unit get() = Unit 25 | 26 | fun get(clazz: KClass): T = 27 | getKoin().get(clazz = clazz, qualifier = null, parameters = null) 28 | 29 | 30 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/util/Literals.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.util 19 | 20 | object Literals { 21 | 22 | const val ASTERIX = "*" 23 | 24 | const val EMPTY_STRING = "" 25 | 26 | const val TEXT_INVALID = "" 27 | 28 | const val UNDEFINED_ID = -1L 29 | 30 | const val UNDEFINED_UID = -1 31 | 32 | const val UNDEFINED_INDEX = -1 33 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/InvalidJsonKeyException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.toLiteral 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class InvalidJsonKeyException(ctx: Ctx, private val form: Any) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Not a valid JSON property key: ${form.toLiteral()}" 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/Set.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | import com.google.gson.JsonArray 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | interface Set : Collection { 24 | 25 | fun conj(tail: Any): Set 26 | 27 | fun cons(head: Any): List 28 | 29 | fun toArray(): Array 30 | 31 | fun toJson(ctx: Ctx): JsonArray 32 | } 33 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/InvalidJsonValueException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.toLiteral 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class InvalidJsonValueException(ctx: Ctx, private val form: Any) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Not a valid JSON property value: ${form.toLiteral()}" 27 | } -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 160dp 7 | 16dp 8 | 9 | 4dp 10 | 8dp 11 | 16dp 12 | 32dp 13 | 64dp 14 | 15 | @dimen/padding_medium 16 | 20sp 17 | 16sp 18 | 19 | 16sp 20 | 8sp 21 | 22 | 36dp 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/InvalidBundleValueException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.toLiteral 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class InvalidBundleValueException(ctx: Ctx, private val form: Any) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Not a valid Bundle property value: ${form.toLiteral()}" 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/vm/ExecutionState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.vm 19 | 20 | enum class ExecutionState { 21 | IDLE, 22 | STARTED, 23 | PAUSED, 24 | STOPPED, 25 | TERMINATED; 26 | 27 | fun isStarted() = this == STARTED 28 | 29 | fun isPaused() = this == PAUSED 30 | 31 | fun isStopped() = this == STOPPED 32 | 33 | fun isTerminated() = this == TERMINATED 34 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/NotCallableException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.toLiteral 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class NotCallableException(ctx: Ctx, private val value: Any) : FlxException(ctx) { 24 | 25 | override val message: String? 26 | get() = "Value '${value.toLiteral()}' is not callable." 27 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_spinner_caret_flx.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/InvalidJsonArrayElementException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.toLiteral 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class InvalidJsonArrayElementException(ctx: Ctx, private val form: Any) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Not a valid JSON array element: ${form.toLiteral()}" 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/UnsupportedJsonException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import com.google.gson.JsonElement 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class UnsupportedJsonElementException(ctx: Ctx, private val jsonElement: JsonElement) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Unsupported JSON element: ${jsonElement.toString()}" 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/function/AbstractFunctionObject.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.function 19 | 20 | import org.fuusio.flx.core.* 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | abstract class AbstractFunctionObject(override val functionName: Symbol? = null) : 24 | EvaluableObject(), FunctionObject { 25 | 26 | override fun call(ctx: Ctx, args: Array): Any = this 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/rx/Subscription.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.rx 19 | 20 | import org.fuusio.flx.core.function.FunctionObject 21 | 22 | data class Subscription( 23 | val observable: Observable, 24 | val observer: FunctionObject, 25 | var isEnabled: Boolean = false 26 | ) { 27 | override fun toString(): String = 28 | "Subscription [ observable = $observable, observer = $observer ]" 29 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/util/CommonExtensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.util 19 | 20 | @Suppress("unused") 21 | val Any?.unit get() = Unit 22 | 23 | fun Int.isEven(): Boolean = this % 2 == 0 24 | 25 | fun Int.isOdd(): Boolean = !this.isEven() 26 | 27 | fun Long.isEven(): Boolean = this % 2L == 0L 28 | 29 | fun Long.isOdd(): Boolean = !this.isEven() 30 | 31 | fun wtf(): Nothing = throw IllegalStateException() 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/repl/widget/FormEditText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * All rights reserved. 7 | */ 8 | package com.flx.features.repl.widget 9 | 10 | import android.content.Context 11 | import android.text.InputType.* 12 | import android.util.AttributeSet 13 | import android.view.inputmethod.EditorInfo 14 | import android.view.inputmethod.InputConnection 15 | 16 | 17 | class FormEditText(context: Context, attributeSet: AttributeSet) 18 | : androidx.appcompat.widget.AppCompatEditText(context, attributeSet) { 19 | 20 | override fun onCreateInputConnection(outAttrs: EditorInfo): InputConnection { 21 | val inputConnection: InputConnection = super.onCreateInputConnection(outAttrs)!! 22 | outAttrs.inputType = TYPE_TEXT_FLAG_NO_SUGGESTIONS or 23 | TYPE_TEXT_VARIATION_FILTER or 24 | TYPE_CLASS_TEXT or 25 | TYPE_TEXT_VARIATION_VISIBLE_PASSWORD or 26 | TYPE_TEXT_VARIATION_PASSWORD 27 | outAttrs.privateImeOptions = "nm" 28 | return inputConnection 29 | } 30 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/ImmutableSymbolException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.Symbol 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class ImmutableSymbolException(ctx: Ctx, private val symbol: Symbol) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Symbol '${symbol.name}' is immutable. Its value cannot be modified." 27 | } -------------------------------------------------------------------------------- /app/src/main/res/color/control_highlight_material_flx.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/MethodNotFoundException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.vm.Ctx 21 | 22 | class MethodNotFoundException(ctx: Ctx, private val objectClass: Class<*>, private val methodName: String) : FlxException(ctx) { 23 | 24 | override val message: String 25 | get() = "Class '${objectClass.name}' does not define method '$methodName'." 26 | 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/UninitializedSymbolAccessException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.Symbol 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class UninitializedSymbolAccessException(ctx: Ctx, val symbol: Symbol) : FlxException(ctx) { 24 | 25 | override val message: String? 26 | get() = "Symbol '${symbol.name}' does not have an assigned value." 27 | } -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/type/List.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.type 19 | 20 | import org.fuusio.flx.core.function.FunctionObject 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | interface List : Sequence { 24 | 25 | fun conj(tail: Any): List 26 | 27 | fun filter(ctx: Ctx, predicate: FunctionObject): List 28 | 29 | override fun rest(): List 30 | 31 | fun toArray(): Array 32 | 33 | fun toSet(): Set 34 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/VarRedefinitionException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.Symbol 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class VarRedefinitionException(ctx: Ctx, private val symbol: Symbol) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Symbol '${symbol.name}' is already defined to be a mutable variable. It cannot be defined again." 27 | } -------------------------------------------------------------------------------- /flx/src/main/java/org/fuusio/flx/core/error/ValRedefinitionException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package org.fuusio.flx.core.error 19 | 20 | import org.fuusio.flx.core.Symbol 21 | import org.fuusio.flx.core.vm.Ctx 22 | 23 | class ValRedefinitionException(ctx: Ctx, private val symbol: Symbol) : FlxException(ctx) { 24 | 25 | override val message: String 26 | get() = "Symbol '${symbol.name}' is already defined to be an immutable variable. It cannot be defined again." 27 | } -------------------------------------------------------------------------------- /app/src/main/java/org/fuusio/api/view/ActionButton.kt: -------------------------------------------------------------------------------- 1 | package org.fuusio.api.view 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.Context 5 | import android.view.LayoutInflater 6 | import androidx.annotation.DrawableRes 7 | import androidx.annotation.StringRes 8 | import androidx.constraintlayout.widget.ConstraintLayout 9 | import androidx.core.content.res.ResourcesCompat 10 | import com.google.android.material.button.MaterialButton 11 | import com.flx.lisp.app.databinding.ActionButtonBinding 12 | 13 | @SuppressLint("ViewConstructor") 14 | class ActionButton(context: Context, @DrawableRes iconRes: Int, @StringRes textRes: Int) 15 | : ConstraintLayout(context) { 16 | 17 | private val button: MaterialButton 18 | 19 | init{ 20 | val binding = ActionButtonBinding.inflate(LayoutInflater.from(context), this, true) 21 | button = binding.buttonAction 22 | button.icon = ResourcesCompat.getDrawable(resources, iconRes, context.theme) 23 | button.text = resources.getString(textRes) 24 | } 25 | 26 | override fun setOnClickListener(listener: OnClickListener?) { 27 | button.setOnClickListener(listener) 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/java/com/flx/features/start/view/StartFragment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 - 2021 Marko Salmela 3 | * 4 | * http://fuusio.org 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.flx.features.start.view 19 | 20 | import androidx.viewbinding.ViewBinding 21 | import org.fuusio.api.view.ViewBindingFragment 22 | 23 | abstract class StartFragment : ViewBindingFragment() { 24 | 25 | override fun onResume() { 26 | onActivate(requireActivity() as StartActivity) 27 | super.onResume() 28 | } 29 | 30 | protected abstract fun onActivate(activity: StartActivity) 31 | } 32 | --------------------------------------------------------------------------------