ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i want to make user inteface for my C program in linux.
is there any way other than GTK Glade interface?? i never used Glade before so i do not know weahter i could make UserInterface for my C program in that or not? as Glade has its own programing syntax!
I'm a newb too, and have never messed with making GUI's (well I've tried a couple times and got overwhelmed and gave up), but I think the basic principal is, you use a framework and build your app around it... Think of it like constructing a building... You have to build up the framework (i.e. steel beams and stuff) then lay your concrete on top of that so it doesn't all collapse. Of course you can do it without that framework, and build something of wood or whatnot, like a house (though that still uses a frame, but that's beside the point). And you can use different frameworks to suit your needs or personal preference.
Keep in mind this is a very lamens-term description, coming from a guy who knows next to nothing about the subject...
But anyway, you can use the Qt libs, or GKT+, or whatever you want. I'm sure there are more, but those are the popular ones. Basically you make your app in plain old C, as a command-line tool, then add in the GUI components, or you can start from scratch and use your CLI (Command Line Interface) tool as a reference, while building the GUI app from the ground up, based on the source code of CLI version.
It's more complicated than how I worded it, but that's the basic gist of it.
And like I said, please keep in mind that I may actually have no idea what I'm talking about! (But I think I do!)
The original post said "user interface", so that could include curses/ncurses. Not graphical, but still a UI, and not too hard to learn, although the experience will not be very transferable to other UIs.
n sorry i didnt use a word 'Graphical'. thats what i actually need a GUI for my program. i need that type of tool or software that support C language and i just have to design the GUI and do not have to code again evry thing (of my program).
i worked on Windows( used Dreamweaver , Visual Studio) so i was wondering if i find such tool in Linux also!
I think if you use Glade to generate the skeleton of your application GUI, you can drop to a C-only environment at the point when you're happy with the basic arrangement. As I understand it, the basic premise of GTK vs Windows is not very different in principle. Everything is a callback, and a response to a certain type of signal. I've never done any Windows GUI programming, but I believe the same concept is true there. In fact, I think the same is true for most GUI building toolkits.
I have done a bit of GTK coding, and after the initial learning curve, I found it fairly straightforward. You just need to have a decent reference on hand, to get the syntax right, and to see what options are possible. For GTK, I think the definitive reference is the online one at the GTK website. I also used a book which had a little more detail, but that was a few years ago, and I don't know what's been published more recently that is up-to-date and complete.
They give you the tools to build a UI, which is also what you get from ncurses.
Blender has an OpenGL-based UI.
Okay, I think I mis-worded my question. I suppose any graphics toolkit could be used to build a UI, but I still see a distinction between toolkits which are for general purpose graphics like drawing swirly colors and so on, versus a UI toolkit, which uses graphics to provide widgets which are active in some way, and which provides some framework for handling user actions from such as pointers and keyboards.
Curses provides a little of that, with things like menus and dialogs.