Compiler features

B

bartc

superpollo said:
TK ??? are there bindings and headers for C ?

hope so.

Apparently. But you won't get any help from the docs for Tk, which tell you
absolutely everything except how to do it!

If you find out how to use Tk stuff from C (without the Tk system taking
over your application) please post here; thanks.
 
N

Nobody

If you find out how to use Tk stuff from C (without the Tk system taking
over your application) please post here; thanks.

If you don't want to write an "enhanced wish", you need to clone
Tk_MainEx(), but omit the Tk_MainLoop() call. Tk_MainLoop() itself is
just:

void
Tk_MainLoop()
{
while (Tk_GetNumMainWindows() > 0) {
Tcl_DoOneEvent(0);
}
}

but there isn't a specific "initialise Tk without entering the main loop"
function.
 
N

Nobody

If you find out how to use Tk stuff from C (without the Tk system taking
over your application) please post here; thanks.

If you don't want to write an "enhanced wish", you need to clone
Tk_MainEx(), but omit the Tk_MainLoop() call. Tk_MainLoop() itself is
just: [snip]
but there isn't a specific "initialise Tk without entering the main
loop" function.

still...

i would like to see a minimal but interactive iso C program with tk
widgets that compiles and runs on at least two popular platforms (say
gcc on linux and mingw on win32).

Well, wish itself fits that specification. Any trivial program is going to
be most logically implemented as an enhanced wish; you would have to put
some thought into contriving an example where letting Tk's main loop run
would cause significant problems.

Beyond that, it's normal for GUI toolkits to "take over" the application;
Tk isn't alone in this regard. Almost any non-trivial use of the toolkit
requires letting it process pending events.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,172
Latest member
NFTPRrAgenncy
Top