UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C++
  • » Code embedding problem

#1 2004-08-26 10:18 AM

alokdotnet
Member
From: IN
Registered: 2004-08-26
Posts: 25
Website

Re: Code embedding problem

Hi Geeks,
my self and my team is making a project on linux. with language c. we want tto make our project GUI competiable. But prob is that 2 of us are making GUI and me and my partner making core of project in c.
but how we will able to embade our code in thaT gui.
PLZ REPLY SOON....
:?:  :?:  :?:  :?:  :?:  :?:


Alok

Offline

#2 2004-08-27 08:46 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Code embedding problem

It's totally unclear what you want and what your problem is...

Offline

#3 2004-08-28 08:30 PM

alokdotnet
Member
From: IN
Registered: 2004-08-26
Posts: 25
Website

Re: Code embedding problem


Alok

Offline

#4 2004-08-29 02:22 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Code embedding problem

If the GUI toolkit you use has a C api then there's no mixing, because the GUI is written in C too then.

What you probably mean is how to mix language X with C, where X is the language used by the GUI.

Offline

#5 2004-08-29 07:14 AM

alokdotnet
Member
From: IN
Registered: 2004-08-26
Posts: 25
Website

Re: Code embedding problem


Alok

Offline

#6 2004-08-29 03:59 PM

Nope
Administrator
From: Germany
Registered: 2004-01-24
Posts: 385
Website

Re: Code embedding problem

That's a bit better. But this kind of programming is highly OS specific. So
depending on the target plattform and also dependant on the library you
use the exact steps will be different.
Normally the interface of the "gui" will inform your program that a
mouse-click happened and also gives you the coordinates within your
window. The same goes for actions like keystrokes, a call for (partial)
redraw, closing or hiding of the window and so on. Packages like GLUT will
give you the possibility to register handling functions for them. You'd most
likely have to google for the specific environment, programming language
and library. There is plenty of code examples in the web for them. There
are also often communities with a forum just like this one for the specific
things you'd need for that.

Offline

#7 2004-08-29 04:26 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: Code embedding problem

It depends on the GUI toolkit you use, not really which OS except if you use an OS specific "native" GUI toolkit (mainly in MSWindows). But you two don't make the GUI, so shouldn't have to bother about it.

I think it's best if you two make a C library with all the functionality which is used by the two who write the GUI. That way your code doesn't have to know anything GUI specific. If you need to do certain GUI things (like opening a certain window etc.) then the two writing the GUI should make some functions which can be called by you. This way all the wrapping is done by the GUI part, as it should be.

So the answer is highly GUI toolkit specific, thus you shouldn't bother trying to fix it, the people doing the GUI part should know the answer.

If on the other hand you mean with "doing the GUI" the painting and layout part then you didn't split the project into fair parts.

Offline

  • Index
  • » C++
  • » Code embedding problem

Board footer

Powered by FluxBB