Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a GUI without a framework in C

I'm learning C (I just finished Chapter 2 or Unit 2) of the C Programming Language, I skimmed to the end and saw that at no point anything was said about how to create a GUI, and from what I've looked up, it seems I have to use a framework, but I hate the idea of that. How would I create a GUI without a framework? How exactly do these frameworks work and what language are they written in? I'm not making a massive application, even if it takes me a week, would it be feasible to write a GUI application (in C) to do something simple like creating a window?

like image 838
David Avatar asked Mar 06 '13 07:03

David


People also ask

Can you build GUI with C?

All operating systems are written in C. So, any application, console/GUI you write in C is the standard way of writing for the operating system.

Can you make a GUI without a library?

Depends on the programming language and operating system you're using. In languages like C and C++, you would always need some basic library, like the system library. As for making a GUI application with just the basic API that your operating system provides, sure.

Does C have a GUI library?

C has no such library connected to it like the string library, IO library, etc, that we every now and again use. This weakness opened the skyline for engineers to pick from a wide assortment of GUI library toolbox accessible in C.

Can I make my own GUI?

Building a simple GUI toolkit means providing a couple of basic primitive elements that render content, and then slightly more complex layout elements that can modify the way in which their primitives render the content. Is it possible to write a GUI in C without a Windows API, just a raw C code? Yes.


1 Answers

You can build your own framework based on OpenGL or Xlib. Or use good graphics library like Motif or CGUI. Or use something awful like GTK.

like image 103
Eddy_Em Avatar answered Nov 15 '22 16:11

Eddy_Em