How to build a GUI toolkit from scartch [closed] - c

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I've been chosen to spearhead the construction of an OS from scratch by my firm. In terms of OS basic functionality i'm cool, but I have quite an issue on UI design. How do engineers design UIs all from scratch? e.g. the Mac OSX UI is different from Windows UI and also Unix-like OS's all have different-looking UIs. I have an idea that it might involve C programming but how do engineers define these graphics, their looks plus their interactivity on user-initiated events, are there any libraries that i might not be aware of?
Thanks

Don't build the entire stack from scratch - you are much better off leveraging on at least low-level 2D graphics to ensure good performance. For example for UNIX based systems, you'd use Xlib primitives to build your windowing toolkit on top of it. Use that and lay your abstractions on top of it.
But again, in this time and age it is much better to use an existing toolkit and at worst port the underlying layer to your OS.

Related

How do i create an interface for C Game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I just created the "Hangman game" using C language, i used GCC to compile it and worked in the terminal.
Let's say that i started with C a week ago, and this is the only programming language i know (Html & CSS arn't programming languages even if i know them). I'm a complete beginner so.
My question is, from the code source i have, how can i create an interface, an app that i'd start on windows (instead of linux terminal), with "buttons" or something like that ?
If i can't do this from the code source, what wold u recommend ?
What would be the software i should use instead of visual studio code to write code (because i guess i'll need a specific software if i want an interface or if i want to compile it in order to ceate a windows app ?)
I'm not english native so i may did some languages mistakes, sorry in advance.
Let me know if i can be more precise and explain something using other words.
There are numerous libraries and frameworks which can provide a GUI for your games.
Qt
Dear IMGUI
libsdl with widgets
and many more, depending on your requirements
Related posts:
https://gamedev.stackexchange.com/questions/1086/what-c-gui-library-can-you-suggest
Game GUI framework
http://samirsinha.com/choosing-a-gui-framework/
It's probably best to study existing games and how they are designed, what libraries people use, and so on, before embarking on building your own from scratch.
Also try reading some of the resources in the GameDev Stack Exchange.

Plotting a graph in C (ubuntu) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
i would like to ask a question,because i have been searching for 2 hours.
I have a project in a game development course and i have arrays of some map elements,positions,and lines that connect them.And i need to draw a graph from them.But I don't have the slightest idea.Do i include some header file?
Do i download that? If i had the commands i could work with that,but i don't see graphics command anywhere in code blocks.
Please inform me on what i can use to draw a simple graph,and possibly the installation process in general if it's not too much trouble
There is no such a thing as a "graphics command" somewhere in Code::Blocks. In order to create graphical interfaces and to be able to draw things, you have to use a GUI library (like GTK, Qt, SFML, wx... etc).
Since your requirement is to use C I'd recommand you then to go with GTK. Since it's one of the best and most documented library with C language at it's base.
Note: Please be careful that what I mentioned above are only GUI libraries, i.e. mainly used to create graphical user interfaces. Since you are following a game development course, you may rather want to take a look at game engines such as SDL or Unity, which are quite different things, and enable to perform a lot more (serious) gaming stuff.
Here's a Wikipedia list with a thorough listing of GUI libraries.

What is the difference between drivers and libraries in embedded C [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am wondering what is the difference between drivers and libraries in the embedded C programming. Assuming that I am using uControllers that only have application code/firmware like PICs
With respect to deeply embedded systems (such as the PIC) the distinction is generally that a driver is tied to the hardware and is not portable between platforms, while a regular library should be portable and have no direct hardware dependencies. This is not a hard and fast rule, however it is the most consistent one that I have come across in embedded systems.
It is also common for vendors to call a collection of drivers a library so in a way you can think of drivers as just a special type of hardware dependent library, and a library as simply a collection of related code.

How to write my own virtual machine like VirtualBox? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to write virtual machine. Ideally I want to write program, which will be run(emulate) windows 7(from .iso) and show it in window on Windows 7 parent. But I can't understand how to do it. I understand how to emulate cpu, for example, just write wrapper(interface) which will be provide real cpu resources(http://www.codeproject.com/Articles/43176/How-to-create-your-own-virtual-machine), but what next? how to run OS, which will be use this abstraction interface of cpu. Bios starts OS, should I emulate bios? how to do it? From what should I start? Please, describe me the basic steps to implement my task.
Thank you very much!
I'm sure years and years of work go into these type of programs. However, to get a taste of emulating CPU and coding it yourself, have a look at nand2tetris.
It starts by looking at the logic and arithmetic first, slowly working your way towards program control, high-level language and making a operating system.
Hope this helps!
(BTW it provides all materials and software for free!)

How do you offer Silverlight to clients? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
We know that Silverlight currently in 3.0.x version - very fast transition from Silverlight 2.0.x. For those using Windows and Mac, it will not be an issue since the runtime supports those platform. The problem is with Linux users. I know that Mono guys (through Moonlight project) are doing their best to keep it up to date with Silverlight, but unfortunately they are too much behind.
How do you offer Silverlight to clients considering that facts?
If your client base has "full support for Linux on the desktop" as a pre-req, you're really in an interesting niche -- one I'd love to learn more about, btw, but not one I've ever encountered. If you're REALLY in such a situation, I guess your only viable silverlight strategy is to limit your silverlight use to not much more than is currently available via moonlight, clearly document to your Linux-rabid clients what's missing on Moonlight for them to be able to use your latest release, and endeavor (via clients involvement, involvement of your tech people, bounties for developers that add each missing features, etc) to get Moonlight up to the level you absolutely need it to be!-)

Resources