Author Topic: Aureal's Windows-like Windowing system Announcement (qws)  (Read 9431 times)

0 Members and 1 Guest are viewing this topic.

Offline Aureal

  • Newbie
  • Posts: 17
  • memes
    • View Profile
Aureal's Windows-like Windowing system Announcement (qws)
« on: July 17, 2017, 07:31:10 pm »
Hey! First of all, I wanted to say.. It feels kinda weird that you can actually choose any username, due to the fact that there are almost no accounts created yet!

And well, I've been working on a "clone" of the Microsoft Windows windowing system, at this point, it is almost identical. Its quite buggy tho, but with some work, it may become something nice. In the RAR file I'll share with you through this post, you will find many things. Please read the 'readme.txt' file to get more information. I included that to encourage you to help with the development.

Features (up to this date):
Code: QB64: [Select]
  1.         - Icons
  2.         - Custom Cursors
  3.         - Custom Fonts
  4.         - Native Resolution
  5.         - Exception trapping
  6.         - Wallpapers
  7.         - Search Windows by title
  8.         - Window handles
  9.         - FPS and frame counters
  10.         - (WIP) Buttons, collision detection
  11.         - (WIP) Antialising
  12.         - (WIP) Sounds
  13.         - (WIP) Animations
  14.         - (WIP) Focus
  15.         - (WIP) Animated cursors *this will be the hardest-to-code feature of all the WIPs :D*

There is a screenshot, you can check it out!
« Last Edit: July 17, 2017, 09:55:15 pm by Aureal »

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #1 on: July 17, 2017, 09:34:56 pm »
Hiya Aureal,

I had to double-take your name cause there is a guy around going by "Aurel". Anyway, welcome aboard and nice program. A handful of folks work on similar things, some right this minute for all I know. Keybone works in a very similar direction in particular.

If you can bear to integrate IRC into your culture, we hang out a #qb64 on freenode.
Use http://www.qb64.org/ircpage.html for starters if you don't have a client.

Anyway, keep up the good work and keep us in the LOOP (no pun, but yes pun).
« Last Edit: July 17, 2017, 09:39:53 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #2 on: July 17, 2017, 09:42:35 pm »
Well I tried to run it, but got C++ compilation failed. Maybe because i'm on Linux? Don't have a windows computer to test on.
I am from a Kazakhstan, we follow the hawk.

FellippeHeitor

  • Guest
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #3 on: July 17, 2017, 09:55:36 pm »
I just ran it on macOS and the following had to be modified:
  • Instead of _WIDTH(SCREENIMAGE) just use _DESKTOPWIDTH (also _DESKTOPHEIGHT);
  • Comment out the line _FONT _LOADFONT(ENVIRON$("windir") + "/Fonts/segoeui.ttf", 12)

You may want to load the font first and then apply it if loading was successful, even in Windows:

Code: QB64: [Select]
  1. TheFont& = _LOADFONT(ENVIRON$("windir") + "/Fonts/segoeui.ttf", 12)
  2. IF TheFont& > 0 THEN _FONT TheFont& 'when loading fails, the handle will be -1

Another suggestion (this is new): if you have the latest build of QB64, you won't need a skip: label in the code below:
Code: QB64: [Select]
  1. SUB updateWindows
  2.     FOR i = 0 TO MAX_WINDOWS
  3.         updateMouse
  4.         IF windows(i).wHandle = 0 THEN GOTO skip
  5.         w2x = windows(i).wX + windows(i).wWidth
  6.         w2y = windows(i).wY + windows(i).wHeight
  7.         wh = windows(i).wY - windows(i).wBarheight
  8.         LINE (windows(i).wX - wFrames, wh)-(w2x + wFrames, w2y + wFrames), windows(i).wFgcolor, BF
  9.         LINE (windows(i).wX, windows(i).wY)-(w2x, w2y), windows(i).wBgcolor, BF
  10.         _PUTIMAGE (windows(i).wX + 5, wh + 5)-(windows(i).wX + 25, windows(i).wY - 5), windows(i).wBarIcon
  11.         _PRINTSTRING (windows(i).wX + 30, windows(i).wY - (windows(i).wBarheight / 2) - 5), windows(i).wName
  12.  
  13.         skip:
  14.     NEXT

Try it like this (notice the new _CONTINUE statement):
Code: QB64: [Select]
  1. SUB updateWindows
  2.     FOR i = 0 TO MAX_WINDOWS
  3.         updateMouse
  4.         IF windows(i).wHandle = 0 THEN _CONTINUE
  5.         w2x = windows(i).wX + windows(i).wWidth
  6.         w2y = windows(i).wY + windows(i).wHeight
  7.         wh = windows(i).wY - windows(i).wBarheight
  8.         LINE (windows(i).wX - wFrames, wh)-(w2x + wFrames, w2y + wFrames), windows(i).wFgcolor, BF
  9.         LINE (windows(i).wX, windows(i).wY)-(w2x, w2y), windows(i).wBgcolor, BF
  10.         _PUTIMAGE (windows(i).wX + 5, wh + 5)-(windows(i).wX + 25, windows(i).wY - 5), windows(i).wBarIcon
  11.         _PRINTSTRING (windows(i).wX + 30, windows(i).wY - (windows(i).wBarheight / 2) - 5), windows(i).wName
  12.     NEXT

The above is available starting with build 20170628/55.
« Last Edit: July 17, 2017, 10:12:33 pm by FellippeHeitor »

Offline Aureal

  • Newbie
  • Posts: 17
  • memes
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #4 on: July 17, 2017, 10:21:48 pm »
Thanks Felippe, I will review the code, anyways it is a mess right now :D

Keybone, can you recompile and post the errors?

STxAxTIC I'm checking the IRC right now!

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #5 on: July 17, 2017, 10:40:03 pm »
Thanks Felippe, I will review the code, anyways it is a mess right now :D

Keybone, can you recompile and post the errors?

STxAxTIC I'm checking the IRC right now!

I just upgraded my qb64 version and now it works. Could also be a mistake with how i extracted it before.
Nice job, I'll take a better look sometime later, I work on something similar.
I am from a Kazakhstan, we follow the hawk.

Offline Aureal

  • Newbie
  • Posts: 17
  • memes
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #6 on: July 17, 2017, 10:47:45 pm »
Quote
I just upgraded my qb64 version and now it works. Could also be a mistake with how i extracted it before.
Nice job, I'll take a better look sometime later, I work on something similar.

Nice! I would like to see some of that too!

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #7 on: July 18, 2017, 05:02:33 am »
Nice work, Aureal! :)
Can we make window movable?
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline Aureal

  • Newbie
  • Posts: 17
  • memes
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #8 on: July 18, 2017, 02:07:48 pm »
Yeah sure, I'm working on movable windows!

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #9 on: July 19, 2017, 12:29:51 pm »
Yeah sure, I'm working on movable windows!

At one point, my windowing system consisted of only a single window, and the window was movable and resizeable. You can check it out if you want.
This code was a hack, so dont expect anything neatly written, i know a piece of software is never bugless, but I am pretty confident that there are no *major* bugs.

One thing though, it is kinda counterintuitive because of the way GUIs have been written for a while. In order to drag the icon, you need to drag its titlebar.
The titlebar is kinda small, but is easy to aim at if you move the cursor up through the icon, you get used to it. :)

I am in the process of putting all this functionality into the multiwindow version, last time i tried though it was slow as molasses. :D

download the cloudswide.bmp attached to make it work or replace with an image of your choosing. (change line 66)
« Last Edit: July 19, 2017, 03:51:31 pm by keybone »
I am from a Kazakhstan, we follow the hawk.

Offline Aureal

  • Newbie
  • Posts: 17
  • memes
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #10 on: July 19, 2017, 08:25:13 pm »
WHAT IN THE WORLD ARE THOSE HUGE ELSE IFs?????

FellippeHeitor

  • Guest
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #11 on: July 19, 2017, 09:56:39 pm »
What is life if not a big IF?

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #12 on: July 20, 2017, 12:50:59 am »
WHAT IN THE WORLD ARE THOSE HUGE ELSE IFs?????

Like i said the code isnt the greatest but it works. :)
I am from a Kazakhstan, we follow the hawk.

Offline keybone

  • Forum Regular
  • Posts: 116
  • My name a Nursultan Tulyakbay.
    • View Profile
Re: Aureal's Windows-like Windowing system Announcement (qws)
« Reply #13 on: July 20, 2017, 12:52:13 am »
What is life if not a big IF?

an ELSE? :D
I am from a Kazakhstan, we follow the hawk.