Re: C/C++-applications as objects in gtk?
- From: D-Man <dsh8290 rit edu>
- To: roncom dds nl
- Cc: gtk-list gnome org
- Subject: Re: C/C++-applications as objects in gtk?
- Date: Tue, 31 Oct 2000 23:24:06 -0500
Here comes the fun part. C/C++ is compiled, not interpreted. In (for example) Python, functions (and thus programs) are objects and can be manipulated as such -- passed to other functions, assigned to a local name (aka variable), etc. If you want to treat a compiled (C/C++) app as an object, I think you would need to use CORBA. This would entail writing an IDL file describing the object (app) and then a corresponding CORBA service implementation.
If you just want to interact with another process, you could use some system calls to open a pipe to the app and interact with it that way.
If you know what the api of the app is, you could write some C/C++ code that uses the api and just link against the binary. This may be impossible if the app is proprietary.
To simulate pressing the enter key while communicating with a CLI app through a pipe, simply write the newline character to the pipe ( '\n' ).
-D
On Tue, 31 Oct 2000 08:58:11 Ronald Bultje wrote:
>
>
> Hi there,
>
> is it possible to use an existing c/c++ Application as some sort of
> object-kind-of-thing in a gtk-application?
> The object/c/c++-thing is in this case a tv-viewer and my own application
> should add some functionality to it (buttons, etc), but I still wanna watch
> tv, of course, so I also need the tv viewer-application itself together
> with all other widgets I want to add.
>
> Is there any way to use all existing c/c++-code and make an object of it
> without changing everything?
>
> An another question: is there any way to execute a console-application from
> within my gtk-app? And are there ways to "simulate" the [enter]-key and the
> [Ctrl]-key (this application needs the control-key and the enter key in
> some situations, if I can simulate them then I can make some sort of a GUI
> for it)
>
> Thanks in advance for anyone who can help me,
>
> Ronald
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]