Author Topic: OxyScheme (Scheme Interpreter in O2)  (Read 21814 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #45 on: January 14, 2015, 02:26:01 PM »
Quote
this is entirely GDI+ stuff
then ok !

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #46 on: January 15, 2015, 01:42:24 AM »
Guys,

I know how to make full-window dragging around the screen more pleasant to the eyes and avoid this annoying tear altogether on slower computers. The visual trick is similar to dragging-and-dropping files from window to window under MS Windows and Linux, and it also had its direct analog using the PowerWindows extension under MacOS 9 not so long ago. The ghost window will replicate its parent in everything except blur, and it will also be made much more translucent to stress its temporality while dragging. (please see the attached .AVI)

Yet another option can be to avoid this ghost window altogether and switch off the blur and make the window itself semi-translucent while it is being dragged around, and then to restore its blur, alpha, and color parameters once it is dropped at its target location. Aurel has confirmed that a non-blurred translucent window can be dragged smoothly enough even on a slow PC.

What would you say to that, please?

.

Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #47 on: January 15, 2015, 01:59:24 AM »
Mike
You know that i don't have interest for this OxyScheme BUT
i would like to try this interpreter.
Is there any compiled version with few examples that anyone who is interested can try?
thanks!

Mike Lobanovsky

  • Guest

Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #49 on: January 15, 2015, 02:16:12 AM »
Mike
Ok when i compile this source i get this error.
Do you can add your compiled version (exe)?

.

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #50 on: January 15, 2015, 02:53:46 AM »
Here it goes precompiled with the latest version of OxygenBasic.

nsinit.scm is the interpreter initialization file that's loaded automatically at app start. The other three .scm files are Rob's examples.

The .scm file can be loaded and executed through typing e.g. (load "asciim.scm") and hitting Enter. You can quit the interpreter by typing (quit) + Enter. Many much simpler examples can be found in the r5rs reference manual that's included in the zip that I posted in November. Just type a test command (or sequence of commands) exactly as it is (they are) written in the manual making sure to match the number of opening/closing parentheses in proper places.

.

Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #51 on: January 15, 2015, 03:00:25 AM »
sorry Mike
i do exectly what you say and ..nothing ::)


.

Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #52 on: January 15, 2015, 03:02:50 AM »
..and also by d&d into oxyscheme exe ...i get this:


.

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #53 on: January 15, 2015, 03:09:19 AM »
1. No, you are not. I told you to type (load "asciim.scm"). Now, where are your parentheses in your snapshot?

2. You shouldn't use OxyScheme without its nsinit.scm file because the interpreter will work but will lose much of its extended functionality. Make sure nsinit.scm is put alongside (i.e. in the same folder with) OxyScheme.exe. Also, it wouldn't work with d&d because it needs to load its initialization file first but d&d overrides this behavior.

Patrice Terrier

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #54 on: January 15, 2015, 06:06:10 AM »
The ultimate solution is to work in full composited mode, and render everything onto the DWM DirectDraw surface.

...

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #55 on: January 15, 2015, 09:25:26 AM »
Hi Patrice,

Pleased to meet you! :)

Thanks for the hint. I got its secret meaning and my first hit when googling for the subject matter was your remarkable article on CodeProject dot com dated January 2, 2014. I also read its accompanying license carefully and I found out that its terms were OK by me in all respects.

I'm going to study your material at length and see what parts of it are applicable to my humble project.

At any rate, thanks again for sharing your knowledge and your code that I've always found to be of great educational and practical value.

JRS

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #56 on: January 15, 2015, 09:48:45 AM »
Welcome Patrice!

Glad you decided to join us and looking forward to seeing some of your magic working in OxygenBasic.




Patrice Terrier

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #57 on: January 15, 2015, 10:28:47 AM »
Quote
for the subject matter was your remarkable article on CodeProject dot com dated January 2, 2014
The article was bookmarked only 19 times...
Meaning that very few undesrtood it, probably because its purpose is too different of what they are accustomed to.

I like those Avatar/Oblivion transparent display, prefiguring the next TV generation.

 :)

.
« Last Edit: January 15, 2015, 10:37:22 AM by Patrice Terrier »

Charles Pegge

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #58 on: January 15, 2015, 10:41:09 AM »
Mike,

Your ghost-dragging  solution is ingenious. Your work on this problem is intensive! :)

I'm toying with very simple whole-window transparency. The sweet spot seems to be an alpha value of around 240 (/255), so the background is slightly visible, but not intrusive.

Proposed switch for Oxygen OpenGL apps etc: % WindowOpacity 240

This code is deployed in inc/WinUtil.inc WinMain, above ShowWindow

Code: OxygenBasic
  1.   #ifdef WindowOpacity
  2.     'Set WS_EX_LAYERED on this window
  3.    SetWindowLong(hwnd, GWL_EXSTYLE,
  4.     GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED)
  5.     SetLayeredWindowAttributes(hwnd, 0, WindowOpacity, LWA_ALPHA);
  6.   #endif
  7.  

But Snapshot (Ctrl P) captures the client area before composite transparency is applied. ie: from the frame buffer with glReadPixels.


.

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #59 on: January 15, 2015, 11:56:20 AM »
The article was bookmarked only 19 times...
Meaning that very few undesrtood it

In fact, you've never had a more dedicated reader, student and admirer on your board at José Roca's forum in years than me. :)

I don't own a copy of PB/Win to try your solutions myself in their raw form but it isn't too difficult for an experienced Basic-er to judge their beauty and also the tremendous amount of implicit effort put into concomitant investigation, trial and error behind the code that you made available to public at large so generously and abundantly. Thanks for your creative work on behalf of those in the know. :)