Jump to content
  • Advertisement
Sign in to follow this  
Gink

API/Function-Less GUI?

This topic is 4886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would you go about creating a GUI if you weren't allowed to use any APIs or functions?

Share this post


Link to post
Share on other sites
Advertisement
Well, I guess I would have to rely on stone tablets, since obviously we're no longer in the world of computer programming.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Well, I guess I would have to rely on stone tablets, since obviously we're no longer in the world of computer programming.



I was being serious. How would it be done without using an API? Would you have to write alot of this in assembly?

Quote:

How are you going to output to screen??



How does the windows API output to the screen?

Share this post


Link to post
Share on other sites
Yes you'd have to write in assembly. You'd pretty much have to rewrite the operating system. Windows writes to the screen via routines in win32k.sys along with the drivers particular to the installed video card. This is so low level it's not worth messing with.

Share this post


Link to post
Share on other sites
I'm going to give you the benifit of the doubt and assume you mean you dont want to use a Standard GUI API, but your normal c librarys and functions are ok to use? Correct me if I am wrong.

Share this post


Link to post
Share on other sites
Just wondering how it would be implemented. It wouldnt be possible to develop a GUI in purely C without using an API, would it?

Yes Prod C standard libraries / functions would be ok.

Share this post


Link to post
Share on other sites
Well, first of all, you couldn't use Windows, since all direct device access in Windows is through API functions. Same deal with Linux and MacOS, of course. So dust off your old copy of MS-DOS 6.22.

Now you're using BIOS routines for graphics access, and for input access. (No MOUSE.SYS, you cheater!) The problem, though, is that the BIOS interface is itself an API. So let's ditch that, too. The problem, though, is that you can't really ditch the BIOS without using the BIOS... it's the thing which activates your bootstrap code, after all.

So we'll need to get rid of the BIOS. Luckily, modern computers can do that, since the BIOS code is located in CMOS memory. So all you have to do is reverse engineer the chipset interface to the CMOS memory and program your GUI directly on it. (Technically, you might consider this interface to be an API as well.... but it's okay to cheat a little, right?)

good luck.

Share this post


Link to post
Share on other sites
It's possible to develop a gui in C without using the API but at some point assembler would be required. Bear in mind that possible doesn't mean easy. Such a beastie would have to be low level - like a device driver - and would probably have to call functions from the kernel anyway (ie functions exported by ntoskrnl.exe). It's really not practical to do this as it would probably take you years to accomplish by yourself. It would basically amount to rewriting the operating system, that is, to rewriting the API's. So, this approach doesn't offer much.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!