; ; @ANO_SCRIPT_NAME FOSSMixer ; @ANO_SCRIPT_VERSION 0.0.5 ; @ANO_SCRIPT_DESCRIPTION FreeBSD OSS Mixer ; @ANO_SCRIPT_COPYRIGHT Jani Salonen ; ; Named parameters for Ano script binded functions are defined here: ; ; @ANO_FN_NAMED_PARAMS "apps/fossmixer/fossmixer_fn_params.txt" ; ; @ANO_FLAGS_USE_PROTOS [x] ; @ANO_FLAGS_VAR_NAME_SUBS [x] ; @ANO_FLAGS_VAR_WARN_UNUSED [ ] ; ; @TAG_ATTR_CONTACT Jani Salonen ; @TAG_ATTR_HOMEPAGE https://detroit.sourceforge.net/app_fossmixer.html ; ; Copyright (c) 2016-2024, Jani Salonen ; All rights reserved. ; proto callback cb_open (a) proto callback cb_destroy () proto callback cb_turn_mixer_sel (a, b, c, d, e, f) proto callback cb_turn_mixer_rec (a, b, c, d, e, f) proto callback cb_turn_mixer_mix (a, b, c, d, e, f) proto callback cb_turn_mixer_ext (a, b, c, d, e, f) proto callback cb_push_mixer_tst (a, b, c, d, e, f) proto callback cb_turn_mixer_tst_vol (a, b, c, d, e, f) proto callback cb_turn_mixer_tst_pan (a, b, c, d, e, f) main { ; Global uninitialized variables var [handle] hnd_wnd_main ; Initialize windowing system window_init ; Open main window window_open (\ title_name: "FOSS Mixer", \ title_charset: NULL, \ parent_handle: NOPARENT, \ widget_stack_id: 1, \ widget_set: 0, \ window_refresh_divider: PASSIVE_REFRESH, \ position_x: POS_CENTERED, \ position_y: POS_CENTERED, \ size_width: 1200, \ size_height: 620, \ cb_main_loop: NULL, \ cb_expose: NULL, \ cb_key_press: NULL, \ cb_key_release: NULL, \ cb_button_press: NULL, \ cb_button_release: NULL, \ cb_client_message: NULL, \ cb_configure_notify: NULL, \ cb_destroy_notify: "cb_destroy", \ cb_motion_notify: NULL, \ cb_map_notify: NULL, \ cb_unmap_notify: NULL, \ cb_open_notify: "cb_open") } ; ; Window callbacks ; callback cb_open (_hnd) { mov hnd_wnd_main (_hnd) ; Construct user interface bsd_prepare (\ window_handle: hnd_wnd_main) if rc == 0 : cb_open_ok ; Leave if constructing user interface failed window_close (\ window_handle: hnd_wnd_main) exit cb_open_ok: ; Map main window if constructing user interface was ok window_map (\ window_handle: hnd_wnd_main) } callback cb_destroy { window_close (\ window_handle: hnd_wnd_main) bsd_disperse exit } ; ; Widget callbacks ; callback cb_turn_mixer_sel (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_sel (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) } callback cb_turn_mixer_rec (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_rec (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) } callback cb_turn_mixer_mix (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_mix (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) } callback cb_turn_mixer_ext (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_ext (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) } callback cb_push_mixer_tst (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_tst (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) } callback cb_turn_mixer_tst_vol (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_tst_vol (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) } callback cb_turn_mixer_tst_pan (_widget_name, _widget_id, _min, _max, _steps, _step) { bsd_mixer_tst_pan (\ widget_name: _widget_name, \ steps: _steps, \ step: _step) }