profile
viewpoint
Mohammed Alyousef MoAlyousef KAUH Jeddah, Saudi Arabia https://twitter.com/moalyousef MD.

MoAlyousef/fltk-rs 118

Rust bindings for the FLTK GUI library.

MoAlyousef/cmkr 11

CMakeLists generator from TOML

MoAlyousef/soloud-rs 10

Rust bindings for the soloud audio engine library

MoAlyousef/fltk-rs-demos 4

Repo containing demo apps using the fltk crate

MoAlyousef/rtb 3

A header-only rusty toolbox library

MoAlyousef/fltk-rs-android 1

An example counter app using fltk-rs on Android

MoAlyousef/glu-sys 1

Raw GLU and GL Rust bindings

MoAlyousef/crtb_net 0

C89 wrapper around rtb_net http server and client

MoAlyousef/flandres 0

fltk widgets adapted for android. Still wip.

MoAlyousef/FLMH 0

Single header FLTK Modern Helper

startedtylov/C99Containers

started time in a day

created tagMoAlyousef/fltk-rs

tag0.9.7

Rust bindings for the FLTK GUI library.

created time in 3 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 3fe97b8484ccdf417e67ea77ac0f463cbb465517

Merge pull request #312 from MoAlyousef/master 0.9.7

view details

Mohammed Alyousef

commit sha f159abdcf2e3a584c8330c2fa270b3e5901afb4a

Merge pull request #313 from MoAlyousef/stable Merge pull request #312 from MoAlyousef/master

view details

push time in 3 days

PR opened MoAlyousef/fltk-rs

Merge pull request #312 from MoAlyousef/master

0.9.7

+0 -0

0 comment

0 changed file

pr created time in 3 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 32491ed017200d912e14759281523560d537f3cb

Merge pull request #310 from MoAlyousef/stable Merge pull request #309 from MoAlyousef/master

view details

MoAlyousef

commit sha dd17d286306a247756e50d326368206b402d4401

add doc comment on MenuExt::value return values

view details

MoAlyousef

commit sha 0ecfa6e77589279940e1940de0f76864c8549f10

add set_callback2

view details

MoAlyousef

commit sha de06b4d20c58460c6a73f7d4f008f7025f8d8442

fix set_callback2

view details

MoAlyousef

commit sha df6f61f77ffaafb2f5a57973744230796f752fe7

bump 0.9.7

view details

Mohammed Alyousef

commit sha 3fe97b8484ccdf417e67ea77ac0f463cbb465517

Merge pull request #312 from MoAlyousef/master 0.9.7

view details

push time in 3 days

PR merged MoAlyousef/fltk-rs

0.9.7
+56 -32

0 comment

9 changed files

MoAlyousef

pr closed time in 3 days

PR opened MoAlyousef/fltk-rs

0.9.7
+56 -32

0 comment

9 changed files

pr created time in 3 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha df6f61f77ffaafb2f5a57973744230796f752fe7

bump 0.9.7

view details

push time in 3 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha de06b4d20c58460c6a73f7d4f008f7025f8d8442

fix set_callback2

view details

push time in 3 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 0ecfa6e77589279940e1940de0f76864c8549f10

add set_callback2

view details

push time in 4 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha dd17d286306a247756e50d326368206b402d4401

add doc comment on MenuExt::value return values

view details

push time in 7 days

issue commentdheijl/swyh-rs

audible low noise in every stream

Hi

I've been trying out the code, and the event handling works fine on my windows 10, even without the recursion check. The high value you might get is the -1 returned by butas_cc.value() after casting to usize. The -1 denotes nothing is chosen. (I should add a note in the docs). Also unhandled events should return false: _ => false,

And I think I found OP's bug:

image

Menus in fltk treat forward slashes (as in "Speaker / Headphone (Realtek ...)") as submenus. So choosing "Speaker" gives an index of 0, and choosing "Headphone (Realtek ...)" gives an index of 1.

If we change the handling code to:

                let i = butas_cc.value();
                println!("{}", i);
                if i < 0 {
                    return false;
                }
                let name = devices[i as usize].name().unwrap();

This would panic if I choose "Headphone (Realtek...)" which gives an index of 1 and it's out of bounds and panics, and really Speaker/Headphone should only be 1 device only.

Other than that, I would be interested in OP's pc spec. What architecture is your machine? Some 64 bit programs might run on 32bit but 64 bit capable machines, I think. Maybe some of the libraries are built for different architectures. If it's also possible to build swyh-rs from source, also removing the fltk-bundled feature flag from the Cargo.toml. Sometimes minor abi problems arise from linking to prebuilt binaries.

dkent600

comment created time in 8 days

created tagMoAlyousef/fltk-rs

tag0.9.6

Rust bindings for the FLTK GUI library.

created time in 9 days

release MoAlyousef/fltk-rs

0.9.6

released time in 9 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha da1eb1c2b85302d97efceedf0f454c9ecf8c4c0b

Merge pull request #309 from MoAlyousef/master 0.9.6

view details

Mohammed Alyousef

commit sha 32491ed017200d912e14759281523560d537f3cb

Merge pull request #310 from MoAlyousef/stable Merge pull request #309 from MoAlyousef/master

view details

push time in 9 days

PR opened MoAlyousef/fltk-rs

Merge pull request #309 from MoAlyousef/master

0.9.6

+0 -0

0 comment

0 changed file

pr created time in 9 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 2cfc58bcb0bf527b8479e5da0b6f54fe3b619ef4

Merge pull request #308 from MoAlyousef/stable Merge pull request #307 from MoAlyousef/master

view details

MoAlyousef

commit sha db4daec7c5f70a51fbd1f825a15b2654550c4ff9

refactoring

view details

MoAlyousef

commit sha 1f4f68bb4ee60f72eab742f97c88c6e5b7cc478e

no longer need to set fltk ABI in cmake

view details

MoAlyousef

commit sha 39863f7839554d1e5d954cafd59210a2cc5ecf77

fix app::wait result

view details

MoAlyousef

commit sha 63ae90fbf200c3f984187b88000b826c01d5b1a0

bump 0.9.6

view details

Mohammed Alyousef

commit sha da1eb1c2b85302d97efceedf0f454c9ecf8c4c0b

Merge pull request #309 from MoAlyousef/master 0.9.6

view details

push time in 9 days

PR merged MoAlyousef/fltk-rs

0.9.6
+755 -1038

0 comment

46 changed files

MoAlyousef

pr closed time in 9 days

PR opened MoAlyousef/fltk-rs

0.9.6
+755 -1038

0 comment

46 changed files

pr created time in 9 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 63ae90fbf200c3f984187b88000b826c01d5b1a0

bump 0.9.6

view details

push time in 9 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 39863f7839554d1e5d954cafd59210a2cc5ecf77

fix app::wait result

view details

push time in 9 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 1f4f68bb4ee60f72eab742f97c88c6e5b7cc478e

no longer need to set fltk ABI in cmake

view details

push time in 9 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha db4daec7c5f70a51fbd1f825a15b2654550c4ff9

refactoring

view details

push time in 9 days

issue commentMoAlyousef/soloud-rs

Playing sound freezes/slows down my game

No need. For example this is a long-living application:

use soloud::*;

fn main() {
    let sl = Soloud::default().unwrap();

    let mut wav = audio::Wav::default();
    wav.load("music.mp3").unwrap();
    wav.set_looping(true);
    sl.play(&wav);

    loop { // Imagine this is a game loop where events are handled
        std::thread::sleep(std::time::Duration::from_millis(30));
    }
}

Of course you can use std::thread::spawn to get finer control if for example you have multiple sound sources which you want to control.

jestarray

comment created time in 14 days

created tagMoAlyousef/fltk-rs

tag0.9.5

Rust bindings for the FLTK GUI library.

created time in 14 days

release MoAlyousef/fltk-rs

0.9.5

released time in 14 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 0a429c6d9238a3d25776f1db20b99450b109bbd2

Merge pull request #307 from MoAlyousef/master 0.9.5

view details

Mohammed Alyousef

commit sha 2cfc58bcb0bf527b8479e5da0b6f54fe3b619ef4

Merge pull request #308 from MoAlyousef/stable Merge pull request #307 from MoAlyousef/master

view details

push time in 14 days

PR opened MoAlyousef/fltk-rs

Merge pull request #307 from MoAlyousef/master

0.9.5

+0 -0

0 comment

0 changed file

pr created time in 14 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 37cdbb9f0760f69b9580119999b3d252fb16210d

Merge pull request #306 from MoAlyousef/stable Merge pull request #305 from MoAlyousef/master

view details

Mohammed Alyousef

commit sha 816f82edc6e2208699f1a42f9b68114bad821733

fix patch

view details

MoAlyousef

commit sha 10f6bb7caebedfc1dbbeb1eb5947eeec2630775f

bump 0.9.5

view details

Mohammed Alyousef

commit sha 0a429c6d9238a3d25776f1db20b99450b109bbd2

Merge pull request #307 from MoAlyousef/master 0.9.5

view details

push time in 14 days

PR merged MoAlyousef/fltk-rs

0.9.5
+31 -42

0 comment

7 changed files

MoAlyousef

pr closed time in 14 days

PR opened MoAlyousef/fltk-rs

0.9.5
+31 -42

0 comment

7 changed files

pr created time in 14 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 10f6bb7caebedfc1dbbeb1eb5947eeec2630775f

bump 0.9.5

view details

push time in 14 days

issue commentMoAlyousef/soloud-rs

Playing sound freezes/slows down my game

Yes the while and std::thread::sleep blocks the main thread since not doing so in a terminal application would just terminate the app even before playing any sound (which happens in a different thread, so that part is non-blocking). I’m currently away for a pc, but here is an example from the soloud repo: https://github.com/jarikomppa/soloud/blob/master/demos/env/main.cpp

jestarray

comment created time in 15 days

issue commentMoAlyousef/soloud-rs

Playing sound freezes/slows down my game

Hi Soloud plays sound on a different thread so it doesn’t block the main thread. The examples here explicitly block the main thread so the application waits for the sound to finish before terminating. If you’re using something like the examples here, this would block your main thread. In a long running app like a game or a gui, you shouldn’t need to block the main thread.

You can also delegate launching sound in a threadpool to get better control at launching and stopping sound using messages/channels or something.

jestarray

comment created time in 15 days

issue commentMoAlyousef/fltk-rs

[BUG] Empty file/directory for FileDialog

Hmm I’ll take a deeper look this weekend.

Unfortunately the only thing I can suggest for now is to use nfd-rs, which is a crate intended to show native file dialogs in modal and non-modal modes.

EyeOfPython

comment created time in 17 days

issue commentMoAlyousef/fltk-rs

[BUG] Empty file/directory for FileDialog

Can you try running cargo clean and building against the master branch? I used to get that warning but no longer do.

EyeOfPython

comment created time in 17 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 816f82edc6e2208699f1a42f9b68114bad821733

fix patch

view details

push time in 18 days

issue commentMoAlyousef/fltk-rs

[BUG] Empty file/directory for FileDialog

Hello This is supposed to be fixed in 0.9.4. Note that for the native macOS file dialog to run in a modal mode the app should be built as a bundle.

EyeOfPython

comment created time in 18 days

issue closedMoAlyousef/fltk-rs

Threads example does not use app::lock() and app::unlock()

Is your feature request related to a problem? Please describe.

The threads example should use app::lock() in the main thread, and app::lock() an app::unlock() in the other thread that updates a widget (this is documented in FLTK).

Although it seems to work without in Windows, the GUI hangs solid after a couple of widget updates in Linux. I did not test the example, but experienced it in a real app (https://github.com/dheijl/swyh-rs).

Describe the solution you'd like

Mentioning this somewhere and/or changing the threads example would be nice.

But thanks for your excellent work on this, I really like it!

closed time in 18 days

dheijl

issue commentMoAlyousef/fltk-rs

Threads example does not use app::lock() and app::unlock()

Great. Yes I’ll close this issue.

dheijl

comment created time in 18 days

created tagMoAlyousef/fltk-rs

tag0.9.4

Rust bindings for the FLTK GUI library.

created time in 18 days

release MoAlyousef/fltk-rs

0.9.4

released time in 18 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 52c7c2949bbbb309a94511d88995c31f6f797819

Merge pull request #305 from MoAlyousef/master 0.9.4

view details

Mohammed Alyousef

commit sha 37cdbb9f0760f69b9580119999b3d252fb16210d

Merge pull request #306 from MoAlyousef/stable Merge pull request #305 from MoAlyousef/master

view details

push time in 18 days

PR opened MoAlyousef/fltk-rs

Merge pull request #305 from MoAlyousef/master

0.9.4

+0 -0

0 comment

0 changed file

pr created time in 18 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 1ea1fb0606c1e8cfcc3d2fcf806636de7c6611c9

Merge pull request #303 from MoAlyousef/stable Merge pull request #302 from MoAlyousef/master

view details

MoAlyousef

commit sha 5ada93f7e88f92f6a205b15f7d11c5706de639e1

add lock to wait_for

view details

MoAlyousef

commit sha 00a6367347a77abf448a91dc4e493693b80e097c

add note regarding multithreading

view details

Mohammed Alyousef

commit sha b76b4b35928a79ee726e184749f896272d43a42d

Update CHANGELOG.md

view details

MoAlyousef

commit sha d2dd90dd6e262d984e4bccb261cf4eb793908d57

move thread init to app init

view details

MoAlyousef

commit sha 0de933d42253290f0338f146a12e73177fa68502

update fltk

view details

MoAlyousef

commit sha 3a89b1153a13cb76b1cf4bc5036cae9e8cbf8674

pull NSOpenPanel fix from FLTK

view details

MoAlyousef

commit sha 565a3ed49c9abe6b4c5a56600a9c8936b685e1b0

update CHANGELOG.md

view details

MoAlyousef

commit sha fe0b0cd99fd5bd94539aff1879e86dd08e8274f7

add comment

view details

MoAlyousef

commit sha b7c285dc58a9ff12e172ba4e14e20e7227e755c7

bump 0.9.4

view details

Mohammed Alyousef

commit sha 52c7c2949bbbb309a94511d88995c31f6f797819

Merge pull request #305 from MoAlyousef/master 0.9.4

view details

push time in 18 days

PR merged MoAlyousef/fltk-rs

0.9.4
+53 -15

0 comment

11 changed files

MoAlyousef

pr closed time in 18 days

PR opened MoAlyousef/fltk-rs

0.9.4
+53 -15

0 comment

11 changed files

pr created time in 18 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha b7c285dc58a9ff12e172ba4e14e20e7227e755c7

bump 0.9.4

view details

push time in 18 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha fe0b0cd99fd5bd94539aff1879e86dd08e8274f7

add comment

view details

push time in 18 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 565a3ed49c9abe6b4c5a56600a9c8936b685e1b0

update CHANGELOG.md

view details

push time in 18 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 3a89b1153a13cb76b1cf4bc5036cae9e8cbf8674

pull NSOpenPanel fix from FLTK

view details

push time in 18 days

issue closedfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

Hello! Running this code works on linux and windows, however it fails to return the filename on macos 10.15:

#include <stdio.h>
#include <FL/platform.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Native_File_Chooser.H>

int main() {
  fl_open_display();
  auto chooser = new Fl_Native_File_Chooser();
  chooser->show();
  printf("filename: %s\n", chooser->filename());
}

It also gives a warning:

WARNING: <NSOpenPanel: 0x7fd13541bf80> running implicitly; please run panels using NSSavePanel rather than NSApplication.

This issue from xamarin appears similar: https://github.com/xamarin/xamarin-macios/issues/6474

closed time in 18 days

MoAlyousef

issue commentfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

I'll close this issue now.

MoAlyousef

comment created time in 18 days

issue commentfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

Hmm that's quite interesting. No it wasn't bundled. I was reproducing an issue in the Rust wrapper. I'll keep that in mind. No need to craft anything non-standard in that case. Thank you for all your effort.

MoAlyousef

comment created time in 18 days

issue commentMoAlyousef/fltk-rs

[BUG] Empty file/directory for FileDialog

Hi A fix was added to the FLTK repo which I have also pulled into this repo (currently on master). Can you check if it also works for you by building against this git repo:

[dependencies]
fltk = { git = "https://github.com/moalyousef/fltk-rs" }

Thank you

EyeOfPython

comment created time in 18 days

issue commentfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

I agree. All documentation out there suggests that runModal suffices. It could be a problem in my old and slow macbook air!

MoAlyousef

comment created time in 18 days

issue commentfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

I'm able to keep it alive using this:

      while (![_panel URL]) { 
        retval = [_panel runModal];
        if (retval == NSModalResponseCancel) break;
      }

However I get a flicker in the beginning

MoAlyousef

comment created time in 18 days

issue commentfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

Strange. I'm also running macOS 10.15.7. The warning is gone however.

MoAlyousef

comment created time in 18 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 0de933d42253290f0338f146a12e73177fa68502

update fltk

view details

push time in 18 days

issue commentfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

Hello Manolo Thanks for your efforts. The panel opens and disappears right away. Some printf debugging shows runModal giving an NSModalResponseStop signal (-1000).

MoAlyousef

comment created time in 18 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha d2dd90dd6e262d984e4bccb261cf4eb793908d57

move thread init to app init

view details

push time in 18 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha b76b4b35928a79ee726e184749f896272d43a42d

Update CHANGELOG.md

view details

push time in 19 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 00a6367347a77abf448a91dc4e493693b80e097c

add note regarding multithreading

view details

push time in 19 days

issue commentMoAlyousef/fltk-rs

Threads example does not use app::lock() and app::unlock()

Looking closer at the swyh-rs code, I see that you call app::wait_for, I have changed it to actually acquire a lock. FLTK uses recursive mutexes, so they can be called more than once, so long as the lock is reacquired by the widgets. I have removed all explicit calls to app::lock and app::unlock in swyh-rs, and it worked fine for me, even tho app::wait_for is called more than once. The change is currently in master. You can add it using

[dependencies]
fltk = { git = "https://github.com/moalyousef/fltk-rs" }

You can also point your cargo toml to your fork of cpal, which would make it easier for swyh-rs users to build from source without having to modify the Cargo.toml.

cpal = { git = "https://github.com/dheijl/cpal" }
dheijl

comment created time in 19 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 5ada93f7e88f92f6a205b15f7d11c5706de639e1

add lock to wait_for

view details

push time in 19 days

issue commentMoAlyousef/fltk-rs

Threads example does not use app::lock() and app::unlock()

Sure, I'll add it to the FAQ and as a comment to the threads example.

dheijl

comment created time in 19 days

issue commentMoAlyousef/fltk-rs

Threads example does not use app::lock() and app::unlock()

Hi. Thank you. Nice application by the way.

As for locking, it should be carried out in the C++ wrapper's side. Every mutating action on a widget is surrounded by a LOCK macro (precedes the action by a lock() then follows the action by unlock and awake). Also a lock is internally done before running the event loop, this enables the internal fltk lock before showing the windows or widgets. Also the message passing for callbacks depends on Fl::awake(void *) and Fl::thread_message() working correctly. So normally things should work out with having to explicitly call app::lock() and app::unlock();

There could be missing LOCKs or bugs in the C++ wrapper, I would need to investigate it further.

dheijl

comment created time in 19 days

starteddheijl/swyh-rs

started time in 19 days

issue closedMoAlyousef/fltk-rs

Add wrap_mode functions in TextDisplayExt

Is your feature request related to a problem? Please describe. Not being able to enable/disable word wrapping is keeping my project from being release-worthy.

Describe the solution you'd like Add https://www.fltk.org/doc-1.3/classFl__Text__Display.html#ab9378d48b949f8fc7da04c6be4142c54 and related functions and enums to the bindings

closed time in 20 days

djarb

created tagMoAlyousef/fltk-rs

tag0.9.3

Rust bindings for the FLTK GUI library.

created time in 20 days

release MoAlyousef/fltk-rs

0.9.3

released time in 20 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 776d8d89bcfa075b300e2907837383d8adb88afa

Merge pull request #302 from MoAlyousef/master 0.9.3

view details

Mohammed Alyousef

commit sha 1ea1fb0606c1e8cfcc3d2fcf806636de7c6611c9

Merge pull request #303 from MoAlyousef/stable Merge pull request #302 from MoAlyousef/master

view details

push time in 20 days

PR opened MoAlyousef/fltk-rs

Merge pull request #302 from MoAlyousef/master

0.9.3

+0 -0

0 comment

0 changed file

pr created time in 20 days

push eventMoAlyousef/fltk-rs

Mohammed Alyousef

commit sha 851d06ac909baeb886992f8cedaa0ba707016757

Merge pull request #298 from MoAlyousef/stable Merge pull request #297 from MoAlyousef/master

view details

MoAlyousef

commit sha 8c39d4755df8601c66d602254bef1633f7202e2a

add app::set_scrollbar_size and app::scrollbar_size

view details

MoAlyousef

commit sha feb429d4ca279a48b68e42fe5fc2eaebc5acaeb9

add wrapping mode enum and method

view details

MoAlyousef

commit sha bf06fb33c2d87d3bba255f65f0572d3d5cfad72d

fix Window::show_with_args

view details

MoAlyousef

commit sha f29c8131d99757d9b397caaeda65af3f5ee05b11

bump 0.9.3

view details

Mohammed Alyousef

commit sha 776d8d89bcfa075b300e2907837383d8adb88afa

Merge pull request #302 from MoAlyousef/master 0.9.3

view details

push time in 20 days

PR merged MoAlyousef/fltk-rs

0.9.3
+226 -18

0 comment

19 changed files

MoAlyousef

pr closed time in 20 days

PR opened MoAlyousef/fltk-rs

0.9.3
+226 -18

0 comment

19 changed files

pr created time in 20 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha f29c8131d99757d9b397caaeda65af3f5ee05b11

bump 0.9.3

view details

push time in 20 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha bf06fb33c2d87d3bba255f65f0572d3d5cfad72d

fix Window::show_with_args

view details

push time in 20 days

issue commentMoAlyousef/fltk-rs

Add wrap_mode functions in TextDisplayExt

Hi I've added the DisplayExt::wrap_mode() method and the text::WrapMode enum. They're in master.

use fltk::*;
let mut editor = TextEditor::new(/* params */);
editor.wrap_mode(text::WrapMode::AtColumn, 10);

I've also added wrapped_row and wrapped_column, but these appear shaky to me, even in their docs!

djarb

comment created time in 20 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha feb429d4ca279a48b68e42fe5fc2eaebc5acaeb9

add wrapping mode enum and method

view details

push time in 20 days

push eventMoAlyousef/fltk-rs

MoAlyousef

commit sha 8c39d4755df8601c66d602254bef1633f7202e2a

add app::set_scrollbar_size and app::scrollbar_size

view details

push time in 20 days

push eventMoAlyousef/soloud-rs

MoAlyousef

commit sha 9a1dae09f70fa9adf64655b7679f6b4cacd972af

bump 0.2.1

view details

push time in 21 days

push eventMoAlyousef/soloud-rs

MoAlyousef

commit sha f612f0577c0669cdd10aba2840f202e7c88958bf

add AsRef<Path> impl for load and from_path

view details

push time in 21 days

pull request commentMoAlyousef/soloud-rs

add FromExt

Hi Looks good. Thank you!

I was also meaning to add an AsRef<Path> implementations so this can also be done:

let wav = audio::Wav::from_path("sample.wav")?;

I'll release a patch tonight.

toyboot4e

comment created time in 21 days

push eventMoAlyousef/soloud-rs

toyboot4e

commit sha 06f236b22726fbe4f1480dda3290275fa1bd8d31

add FromExt

view details

Mohammed Alyousef

commit sha 0b9ec9755e3414bc59086045a68aece0a6a00af4

Merge pull request #2 from toyboot4e/from_ext add FromExt

view details

push time in 21 days

PR merged MoAlyousef/soloud-rs

add FromExt

Thank you for your awesome work!

I tried adding helper trait in prelude:

use soloud::*;
let mut sl = Soloud::default()?;
let wav = audio::Wav::from_path(&std::path::Path::new("sample.wav"))?;

What do you think about it? I guess this is fine for at least Wav.

+22 -1

0 comment

1 changed file

toyboot4e

pr closed time in 21 days

issue openedfltk/fltk

MacOS 10.15: NSOpenPanel modal issue

Running this code works on linux and windows, however it fails to return the filename on macos 10.15:

#include <stdio.h>
#include <FL/platform.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Native_File_Chooser.H>

int main() {
  fl_open_display();
  auto chooser = new Fl_Native_File_Chooser();
  chooser->show();
  printf("filename: %s\n", chooser->filename());
}

It also gives a warning:

WARNING: <NSOpenPanel: 0x7fd13541bf80> running implicitly; please run panels using NSSavePanel rather than NSApplication.

This issue from xamarin appears similar: https://github.com/xamarin/xamarin-macios/issues/6474

created time in 23 days

issue commentMoAlyousef/fltk-rs

[BUG] Empty file/directory for FileDialog

I was also able to reproduce this in C++:

#include <FL/platform.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Native_File_Chooser.H>

int main(int argc, char ** argv) {
  fl_open_display();
  auto chooser = new Fl_Native_File_Chooser();
  chooser->show();
  auto file = chooser->filename();
  printf("filename: %s\n", file);
}

It seems macos 10.15 changed its api since this also gives me:

WARNING: <NSOpenPanel: 0x7fd13541bf80> running implicitly; please run panels using NSSavePanel rather than NSApplication.

Which seems to be similar to other issues online: https://github.com/xamarin/xamarin-macios/issues/6474

I'll also open an issue in the FLTK repo.

EyeOfPython

comment created time in 23 days

push eventMoAlyousef/flandres

MoAlyousef

commit sha 59962e4cd2eee14c8630fb6bffdf72de0a4d8b1b

fix readme

view details

push time in 24 days

push eventMoAlyousef/flandres

MoAlyousef

commit sha 173d860a2c15bc463bfc6f3c14f45eec6c7a58a4

add some docs

view details

push time in 24 days

push eventMoAlyousef/flandres

Mohammed Alyousef

commit sha bfd9355083a18ea3fb1ded25e1ab62baacb70bbe

Add files via upload

view details

push time in 24 days

create barnchMoAlyousef/flandres

branch : master

created branch time in 24 days

created repositoryMoAlyousef/flandres

fltk widgets adapted for android. Still wip.

created time in 24 days

PR closed jarikomppa/soloud

Replace malloc.h with stdlib.h

This should fix building with AppleClang since the current 10.15 sdk broke gcc! (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835)

Also the malloc header is non-standard and also deprecated.

+1 -2

0 comment

2 changed files

MoAlyousef

pr closed time in 24 days

more