Dustpuppy 16 Posted July 19, 2017 Share Posted July 19, 2017 Here we are!!! I am finished for the first release....(i hope) If you want to test it, just do "pastebin run Kz9E2JGL" on the computer in your minecraft world. You need an internet card for this. This will install all needed files in /usr/lib/windowmanager and /etc/windowmanager. During the installation you will be ask for the admin user name and the password. You can choose, whatever you want, but best is to use your mc username, because the software will add user to the computer using (funny sentence), like useradd in OS does. After finishing the installation just start it with "windowmanager" Minumum requirements for the computer are, a tier 2 screen, a modem, a keyboard 640k ram and a user who use it. I will do a proper documentation, how to make own programs, after i got some response and when i find the time. For now, just have a look into /usr/lib/windowmanager/programs/program_frame.lua. It's a frame work for making new programs. Or have a look into the other files in this directory. Here's a list of functions that are available. Not complete, but i am working on the documentation. Enjoy and have fun. Quote Basic functions: wm.startGui() Start the window manager and the program manager. (Not needed, if you use the program_frame.lua file, because windowmanager will do this allready. wm.exitGui() Close the gui system. Attention: You need to reboot after all. Trying to fix this problem. wm.setTopText(text) Set the text on top of the screen. wm.redraw() Redraw the whole screen. ------------------------------------------------------------------------------- Functions for windows: wm.newWindow(x, y, w, h, text) Create a new window. wm.raiseWindow(self) Show window on screen. wm.closeWindow(self) Close a window. wm.lowerWindow(self) Lower a window. wm.resizeWindow(self, w, h) Set a new size to the window. wm.disableWindowButtons(self, state) Disable/enable the close and the lower button. wm.setWindowSticky(self, state) Disable movement of window. wm.hideWindow(self, state) Hide a window from the window list, even when it is lowered. wm.setOnCloseCallback(self, callback) Callback that will called, when window is closed. If callback returns false, the window will stay open. wm.setOnLowerCallback(self, callback) Callback that will called, when window is lowered. wm.setOnResizeCallback(self, callback) Callback that will called, when a window is raised to the screen. wm.getWindowInfo(self) Returns x,y,w,h,text and number of elements of a window. wm.setWindowResizable(self, state) Enables on screen resizable of the window. If true, you can click the lower-right corner of a window and drag/drop to new size. This is normaly disabled, because the screen will heavaly flicker. wm.getActiveWindow() Returns the active window. wm.addElement(self, element) Adds an element to the window. wm.newElement(id, x, y, w, h, text, callback) This is normaly not needed. It's internal called from the gui system. Coders who want to make own elements can use it. ------------------------------------------------------------------------------- Functions for menus wm.newMenu(x, y, w, text, callback) Creates a new menu. Callback will get the number of the selected entry as agument. wm.insertMenu(self, entry) Insert an entry (just text) into the menu. wm.removeMenu(self, entry) Removes the entry from the menu. wm.clearMenu(self) Clears a full menu from all entries. wm.setMenuCallback(self, callback) Se the callback of the menu. wm.drawMenu(self) Displays a menu on screen. wm.menuSetPosition(self, x, y) Changes the position of the menu. wm.menuUseFrame(self, state) Set to true to use frames and the menu text, or false for just a menu with only the entries. ------------------------------------------------------------------------------- The modem functions are not needed to be used, but the collection of packet information will not work without. wm.modemSend(addr, port, ...) wm.modemBroadcast(port, ...) Both functions are the same then the standard modem functions. They just collect some extra infos. wm.getModemPackets() Returns sended packets, received packets, sended bytes, received bytes. Numbers are only correct, if you use the modemSend and modemBroadcast functions. ------------------------------------------------------------------------------- Program manager functions. If you have made a program for the gui system and you want to have it in your next program to without copying the code into your new program, you can simply use your code with some changes in the program manager. Have a look into plugin_framework.lua wm.newSymbol(icon, program) Creates a new symbol in the right-bottom corner of the screen. Icon is a single character and program the full path to the lua program. wm.setSymbolIcon(self, icon) Change the icon. wm.setSymbolProgram(self, program) Change the program to start. wm.drawSymbol(self) Draw a symbol. Usefull to redraw symbols from programs to window manager. ------------------------------------------------------------------------------- Functions for element manipulation. Most of the names are telling you, what they do. self is allways the element it self. win is allways the window the element belongs to. alignment can be "left", "center" or "right". autowordwrap will fit the text into the element. great for labels. state is allways true or false. guiElements.newElement(id, x, y, w, h, text) guiElements.newRadioGroup(x, y, w, callback) guiElements.newList(x, y, w, h, text, callback) guiElements.newInput(x, y, w, text, callback) guiElements.newCheckbox(x, y, text, callback) guiElements.newHBar(x, y, w, h) guiElements.newVSlider(x, y, h, callback) guiElements.newHSlider(x, y, w, callback) guiElements.newFrame(x, y, w, h) guiElements.newLine(x, y, w) guiElements.newLabel(x, y, w, h, text) guiElements.newButton(x, y, w, h, text, callback) guiElements.drawElement(win, self) Draws an element. Call it after changeing something on an element, to redraw it. guiElements.setElementBackground(self, background) guiElements.setElementForeground(self, foreground) guiElements.setElementActiveBackground(self, background) guiElements.setElementActiveForeground(self, foreground) guiElements.setElementX(self, x) guiElements.setElementY(self, y) guiElements.setElementW(self, w) guiElements.setElementH(self, h) guiElements.setElementText(self, text) guiElements.setElementCallback(self, callback) guiElements.setElementAlignment(self, alignment) guiElements.setElementMax(self, max) guiElements.setElementMin(self, min) guiElements.setElementValue(self, value) guiElements.setElementState(self, state) guiElements.setElementSteps(self, steps) Stepsize for bars and sliders. guiElements.setElementAutoWordWrap(self, state) guiElements.setElementSelected(self, state) guiElements.setElementProtected(self, state) If true, input fields will only display *. good for passwords. guiElements.getElementBackground(self) guiElements.getElementForeground(self) guiElements.getElementActiveBackground(self) guiElements.getElementActiveForeground(self) guiElements.getElementX(self) guiElements.getElementY(self) guiElements.getElementW(self) guiElements.getElementH(self, h) guiElements.getElementText(self) guiElements.getElementAlignment(self) guiElements.getElementMax(self) guiElements.getElementMin(self) guiElements.getElementValue(self) guiElements.getElementState(self) guiElements.getElementAutoWordWrap(self) guiElements.getElementType(self) guiElements.getLastElement() guiElements.getElementProtected(self) guiElements.getElementSelected(self) guiElements.insertElementData(self, data) guiElements.removeElementData(self, num) For lists -------------------------------------------------------------------------------------------- Functions for coders who want make their own elements. Have a look into the guiElements.lua file to see, how they work. Normal users don't need this functions. guiElements.setElementType(self, type) guiElements.setElementDrawCallback(self, callback) guiElements.setElementHandleCallback(self, callback) guiElements.setElementUserData1(self, data) guiElements.setElementUserData2(self, data) guiElements.setElementUserData3(self, data) guiElements.getElementUserData1(self) guiElements.getElementUserData2(self) guiElements.getElementUserData3(self) guiElements.setElementIgnoreMouseBlock(self, state) guiElements.getColors() wm.blockMouse(state) wm.setMouseCallback(callback) wm.getColors() Quote Link to post Share on other sites
BrisingrAerowing 12 Posted July 19, 2017 Share Posted July 19, 2017 O_O That looks freaking EPIC! Keep up the good work! Quote Link to post Share on other sites
Dustpuppy 16 Posted July 19, 2017 Author Share Posted July 19, 2017 Updated. First alpha release online now. Quote Link to post Share on other sites
Memelord420 1 Posted July 20, 2017 Share Posted July 20, 2017 All you need now is an editor and it'll be just like the first but with more features, lol Quote Link to post Share on other sites
Dustpuppy 16 Posted July 20, 2017 Author Share Posted July 20, 2017 It will come. But not for making full program as source. More for making a single window, you can then put into your program. But first i finish the print manager for openprinters. Quote Link to post Share on other sites
Memelord420 1 Posted July 20, 2017 Share Posted July 20, 2017 Sounds cool, just a suggestion for the editor though, maybe give it an option to add the code into an already existing file? That's the only way I could see that working. Quote Link to post Share on other sites
Dustpuppy 16 Posted July 20, 2017 Author Share Posted July 20, 2017 Print server is working :-) Quote Link to post Share on other sites
Dustpuppy 16 Posted July 23, 2017 Author Share Posted July 23, 2017 I think, i am getting crazy. Worked a bit on the gui system. It will come much easier to make (let's call them) programs for it. The gui it self is a multi user windows system with driver integration and some nice features. But still can be used as stand alone windows based gui. Multi user driver working to register user to the computer and the gui with differend level. Printer management for openprinter with print queue. Start menu. Just make you gui based programs and add them to the menu. Network driver with own messaging system Drivers will be registered to the gui. Use only, what you need. Or use it just as a simple gui, with no driver, no start menu and no managment programs. Quote Link to post Share on other sites
BrisingrAerowing 12 Posted July 24, 2017 Share Posted July 24, 2017 Wow! That is COOL! Quote Link to post Share on other sites
Scornexon 0 Posted July 26, 2017 Share Posted July 26, 2017 Nice work, i'm currently try to work with this. apperently i struggle a bit. Would it be posible that you upload you source code (Of the programs in the screenshots) to github? I would like to work with the start menu, but it seem that i can't start any program with it. It would be nice to see the source codes of your made programs, so i can look through it and maybe i can finde my mistake. I'm realy looking forward to make some nice programs with this gui. Keep up this great work. Quote Link to post Share on other sites
Dustpuppy 16 Posted July 26, 2017 Author Share Posted July 26, 2017 At the moment i am working on the gui, to get it faster in screen redraw and background buffering. I've packed my full working environment into an archive. http://carr-ireland.com/mc/all.zip Unzip it to the home directory of the oc computer and start test.lua. There are 2 frame work files. program_frame.lua is how to make a program. plugin_framework.lua is for making a symbol program. In test.lua you can see, how to insert them. After first start of test.lua open the user manager and add your self as user. Then delete line 31 ( wm.setUserName("") ) and uncomment user.login() in line 30 and restart the computer and the test.lua to get the multiuser environment running. Exit is not working at the moment, but i fix this after getting other things done. Before i forget. There's a bug in the print manager. Don't remove a printer, after add one. Close and restart the print manager first. Sometimes it hangs. And you need a modem in the computer. Quote Link to post Share on other sites
Dustpuppy 16 Posted July 26, 2017 Author Share Posted July 26, 2017 And the documentation is also not up to date and i am busy, 2 pregnant horses outside (one is nearly finished) and a lot of work on the visual editor and...and...WHAT THE F****?!?! I need much more time. Quote Link to post Share on other sites
Scornexon 0 Posted July 26, 2017 Share Posted July 26, 2017 Thanks for your fast reply, i gonna look through this files and play around with them. I will wait patiently, for new updates for the documentary and API. In my opinion, its just crazy good what you have made here. I hope you can keep going with this API, otherwise it would be a huge lost. But take your time with it. Quote Link to post Share on other sites
Dustpuppy 16 Posted July 27, 2017 Author Share Posted July 27, 2017 Found a little error in the printserver driver. Have uploaded a new zip archive with correct version. If you don't want to test it your self, watch this video. Quote Link to post Share on other sites
Dustpuppy 16 Posted July 28, 2017 Author Share Posted July 28, 2017 Getting forward :-) Some Monitor programs done(Memory and Energy as plugins. Working on filesystem monitor now). Getting on with the terminal window. Insert a system menu. Changed some internal stuff. Quote Link to post Share on other sites
Magik6k 17 Posted July 28, 2017 Share Posted July 28, 2017 THIS IS SO COOL I really do wonder how well it would work with Plan9k as it has (IMO) better threading support, proper virtual component support and component/event sandboxing/namespaces (so a program can/can't see selected components, events can be filtered/translated(like mouse clicks)). Would you mind if I try to port this api there? Oh, and why won't you put this on OpenPrograms/OPPM? Quote Link to post Share on other sites
Dustpuppy 16 Posted July 28, 2017 Author Share Posted July 28, 2017 Give me time. In my point of view it's not finished yet. But if you want, you can port it to Plan9k. Would be great. Don't forget, that i change allways things and specialy add functions to the differend libs, that i am missing during making programs for it. When it is finished, i will have a look to move it into oppm. Quote Link to post Share on other sites
Dustpuppy 16 Posted July 30, 2017 Author Share Posted July 30, 2017 First release out. See main posting. Quote Link to post Share on other sites
RandomRedMage 5 Posted November 14, 2017 Share Posted November 14, 2017 O_O Wow, this is far and away a big step forward from the old api. And the window manager you've put together is essentially a rather functional shell to go over openos. Especially with that terminal window you got there. I'll definitely have to dig around in this and learn how it works. Such awesomeness happened while I was taking a break from minecraft stuff. Quote Link to post Share on other sites
rougeminner 0 Posted November 15, 2017 Share Posted November 15, 2017 Using this would be far easier than making my own just to run simple programs! This is very intriguing, I will take a look at it when I finish my current project, a clever Window Management system for Open Computers would be some help on the user side of things! Quote Link to post Share on other sites
bvierra 0 Posted December 11, 2017 Share Posted December 11, 2017 Not sure if you are still working on this but after installing and picking username/pass I get an error: windowmanager.lua:50: attempt to index local 'file' (a nil value): Traceback: windowmanager.lua:50: in function windowmanager.lua:48 Quote Link to post Share on other sites
Thiago 0 Posted December 11, 2017 Share Posted December 11, 2017 (edited) Every time i try to install it I get: “Failed opening file for writing: home/“filename”: file not found.” Edited December 11, 2017 by Thiago Quote Link to post Share on other sites
Thiago 0 Posted December 11, 2017 Share Posted December 11, 2017 Nevermind. Found a way for it to install properly. Quote Link to post Share on other sites
bvierra 0 Posted December 12, 2017 Share Posted December 12, 2017 19 hours ago, Thiago said: Nevermind. Found a way for it to install properly. mind sharing? Quote Link to post Share on other sites
JackPS9 0 Posted March 6, 2020 Share Posted March 6, 2020 Darn it, I just started using the one from 2016 just to find this XD Good thing I put my code into it's own library as a safety measure and now happy I did Edit: Can't seem to get a window to even show up, even with using the program_frame.lua. Quote Link to post Share on other sites