Jump to content




Window API [NEW TOPIC]

api computer peripheral api command computer

11 replies to this topic

#1 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 07 May 2017 - 10:31 AM

Hello! So i want to make like dragable multishell windows in my Graphical Operative system.
Would window API be the right choise? and can someone explain how window is usefull etc thanks!

//Daniel

Edited by danielsv03, 07 May 2017 - 04:40 PM.


#2 ObloxCC

  • Members
  • 38 posts

Posted 07 May 2017 - 11:37 AM

Checkout my Oblox OS. The code should be easy enough to understand.

#3 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 07 May 2017 - 01:28 PM

View PostObloxCC, on 07 May 2017 - 11:37 AM, said:

Checkout my Oblox OS. The code should be easy enough to understand.

I'm looking at it right now but its pretty hard for me too understand

Thoo i'wd be happy if someone like had a titorial or something

#4 CLNinja

  • Members
  • 191 posts

Posted 07 May 2017 - 04:12 PM

Making dragable windows is out of my realm, but i get the basic premise. You need to have windows setup (So yes, window API would be the best idea for part of it) that listen for click events, and then tell if you've let go or not. If you havnt and you move your cursor, move the window to the proper position.

#5 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 07 May 2017 - 04:38 PM

View PostCLNinja, on 07 May 2017 - 04:12 PM, said:

Making dragable windows is out of my realm, but i get the basic premise. You need to have windows setup (So yes, window API would be the best idea for part of it) that listen for click events, and then tell if you've let go or not. If you havnt and you move your cursor, move the window to the proper position.


But is it possible to like run programs inside a window instead of a tab

#6 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 07 May 2017 - 04:43 PM

SO this contiunes on my last topic if window api for be the right choise for multishell windowed programs but is it possibel to like run programs inside windowes maybe by usin window API or something like that insstead of tabs. I know this is possbile by simply having the program code inside the program that is runing the windows but in my case i can't do that
any help would be helpful :)

//Daniel

#7 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 07 May 2017 - 04:49 PM

Yes, it is, take a look at Lyqyd OS

#8 CLNinja

  • Members
  • 191 posts

Posted 07 May 2017 - 04:59 PM

View Postdanielsv03, on 07 May 2017 - 04:38 PM, said:

View PostCLNinja, on 07 May 2017 - 04:12 PM, said:

Making dragable windows is out of my realm, but i get the basic premise. You need to have windows setup (So yes, window API would be the best idea for part of it) that listen for click events, and then tell if you've let go or not. If you havnt and you move your cursor, move the window to the proper position.


But is it possible to like run programs inside a window instead of a tab
Yes, its completely possible. If you create a window with the window API and redirect term to that, anything that happens will effectively be limited to the area of that box.

#9 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 07 May 2017 - 05:12 PM

View PostCLNinja, on 07 May 2017 - 04:59 PM, said:

View Postdanielsv03, on 07 May 2017 - 04:38 PM, said:

View PostCLNinja, on 07 May 2017 - 04:12 PM, said:

Making dragable windows is out of my realm, but i get the basic premise. You need to have windows setup (So yes, window API would be the best idea for part of it) that listen for click events, and then tell if you've let go or not. If you havnt and you move your cursor, move the window to the proper position.


But is it possible to like run programs inside a window instead of a tab
Yes, its completely possible. If you create a window with the window API and redirect term to that, anything that happens will effectively be limited to the area of that box.


So i tried to do somethinglike this
myWindow = window.create(term.current(),15,5,20,10)
myWindow.setBackgroundColor(colors.white)
myWindow.clear()
term.redirect(mywindow)
print("hello")

But it says like invalid redirect

#10 Exerro

  • Members
  • 801 posts

Posted 07 May 2017 - 05:20 PM

You wrote mywindow not myWindow in the term.redirect call.

#11 danielsv03

  • Members
  • 66 posts
  • LocationMinecraft world

Posted 07 May 2017 - 05:23 PM

View PostExerro, on 07 May 2017 - 05:20 PM, said:

You wrote mywindow not myWindow in the term.redirect call.

Thanks!

#12 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 07 May 2017 - 06:11 PM

Threads merged. Please stick to one topic for series of related questions.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users