1. Irv's GTK Stuff

Irv, I'd love to use your GTK stuff if you'd tell me how to create a 
eugtk.so for FreeBSD...

Otherwise, if I take your advice about not using the console, I'd have 
to dev in Windows. Now, that's not so bad 'cuz I can use Win32Lib and 
Judith's IDE, but I'd rather have something that ultimately will be 
x-plat (or easily x-plat).

In that regard, can anybody suggest a simple x-plat graphics package 
that already works for Linux/FreeBSD and Windows (and whatever other 
flavor of OS you prefer/use)?

In the meantime, I'll be dev'ing for the lowest of the low platforms 
'cuz then I know it'll work everywhere. For instance, my EDB Editor 
(tentatively named "edbed") works in both FreeBSD and Windows 2000. What 
more could a database manipulator want?

-ck

new topic     » topic index » view message » categorize

2. Re: Irv's GTK Stuff

C. K. Lester wrote:

> In that regard, can anybody suggest a simple x-plat graphics package
> that already works for Linux/FreeBSD and Windows (and whatever other
> flavor of OS you prefer/use)?

I've looked at a lot of cross-platform toolkits, and I'm convinced that 
wxWindows is probably the best one you're going to run across. A couple 
things that set it apart:

- It uses native controls, not emulated ones
- It runs on Windows, Linux and OS X
- It does a lot more than just widgets
- It works with every compiler out there
- It's actively being supported

For example, it handles printing, file systems, inter-process communications, 
databases, and so on. Borland is going to use it for one of their upcoming 
projects.

The downside of this is the wxWindows will probably make your application 
fairly hefty, even with the use of something like UPX to compress the 
executable size. A Windows executable will probably be a bit under 1 Meg, and 
a Linux staticly linked executable under 2 Megs.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

3. Re: Irv's GTK Stuff

David,

I have ceased to actively read either the Open Euphoria or the Euphoria
forum, and have been spending what language efforts that I do make these
days on the Icon family of languages, mostly Unicon, though I find Converge
to be a really fascinating "idea". Where are you spending your efforts 
these
days. Searching back through the forums, I noted that the last post that 
you
made from your government location was at the end of 2001. I assume that
you either quit posting from there, or that you have sought  employment
elsewhere. Your talents should be welcome almost anywhere.

At the beginning of December, I am returning to California for a week or
so to celebrate the wedding of my eldest daughter in San Diego. That is
where I married her Mother in 1971, after I had left the Navy. After the
ceremony, I intend to run Route 1 up the coast to SF where I matriculated
at the Navy BEEP school at Mare Island in 1969. From there, I plan to
drive east to Denver to see my other child, and then back to Ingram to
my home. I would be honored if you would allow me to buy you lunch or
a cup of coffee as I pass through your abode.  If not, I will understand. I
doubt that I will drive to California again in my lifetime, but you can 
never
be sure of these things.

I do hope to hear from you from time to time, as I believe that you are
capable of contributing some interesting things to our shared field through
your energy and capability.

Everett L.(Rett) Williams
rett at classicnet.net

David Cuny wrote:

>
>
>C. K. Lester wrote:
>
>  
>>In that regard, can anybody suggest a simple x-plat graphics package
>>that already works for Linux/FreeBSD and Windows (and whatever other
>>flavor of OS you prefer/use)?
>>    
>>
>I've looked at a lot of cross-platform toolkits, and I'm convinced that 
>wxWindows is probably the best one you're going to run across. A couple 
>things that set it apart:
>
>- It uses native controls, not emulated ones
>- It runs on Windows, Linux and OS X
>- It does a lot more than just widgets
>- It works with every compiler out there
>- It's actively being supported
>
>For example, it handles printing, file systems, inter-process communications, 
>databases, and so on. Borland is going to use it for one of their upcoming 
>projects.
>
>The downside of this is the wxWindows will probably make your application 
>fairly hefty, even with the use of something like UPX to compress the 
>executable size. A Windows executable will probably be a bit under 1 Meg, and 
>a Linux staticly linked executable under 2 Megs.
>
>-- David Cuny
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Irv's GTK Stuff

On Tuesday 04 November 2003 08:12 pm, you wrote:
>
>
> Irv, I'd love to use your GTK stuff if you'd tell me how to create a
> eugtk.so for FreeBSD...

You can compile it with the command:
gcc -Wall -shared eugtk.c -o eugtk.so `gtk-config --cflags --libs`
provided you have the gtk development files installed. 
Probably you have those on your BSD cd's , but I don't know if they 
were installed automatically. On Mandrake and Red Hat, those libraries 
get installed if you chose to set up a 'development' platform, but aren't 
installed if you choose some of the other types, such as "graphics 
workstation", or whatever. You can always go back and install them later. 

If you didn't get  the needed files on the BSD cd's, then there's a bit more 
work. You'll have to download the source from http://gtk.org, and do some 
compiling. Note that there are two versions of GTK 1.x and 2.x. Get 1.x.
Also, note that the gtk-config mentioned in the compile command is a separate 
program. You may have to download and compile that first.  Also, note that 
the 'tick' marks in that line are back-ticks (on the same key as the ~).

Let me know how this works.

Irv

new topic     » goto parent     » topic index » view message » categorize

5. Re: Irv's GTK Stuff

On Wednesday 05 November 2003 02:43 pm, you wrote:
>
> David Cuny wrote:
> > C. K. Lester wrote:
> > > In that regard, can anybody suggest a simple x-plat graphics package
> > > that already works for Linux/FreeBSD and Windows (and whatever other
> > > flavor of OS you prefer/use)?
> >
> > I've looked at a lot of cross-platform toolkits, and I'm convinced that
> > wxWindows is probably the best one you're going to run across.
>
> After viewing their website, I will agree. It looks complete and
> functional. So, how does one use that with EUPHORIA? Is that a job for
> Rob Craig? :)

It would be a lot easier to learn Python. wxPython works now, without waiting 
for Rob or anyone else. I took about 10 minutes to look thru the wxWindows 
shared library and decided I had no interest in trying to connect to that with 
Euphoria.  In addition, since wxWindows uses GTK on Linux, there's no 
difference in appearance compared to programs written in plain GTK. 
Some of the complex wx controls are nice, but you could write your own 
as Euphoria includes if you really needed them. And a few of the wx controls, 
such as the calendar, are ugly compared to the GTK originals.

Irv

new topic     » goto parent     » topic index » view message » categorize

6. Re: Irv's GTK Stuff

Irv Mullins wrote:

>On Wednesday 05 November 2003 02:43 pm, you wrote:
>  
>
>>David Cuny wrote:
>>    
>>
>>>C. K. Lester wrote:
>>>      
>>>
>>>>In that regard, can anybody suggest a simple x-plat graphics package
>>>>that already works for Linux/FreeBSD and Windows (and whatever other
>>>>flavor of OS you prefer/use)?
>>>>        
>>>>
>>>I've looked at a lot of cross-platform toolkits, and I'm convinced that
>>>wxWindows is probably the best one you're going to run across.
>>>      
>>>
>>After viewing their website, I will agree. It looks complete and
>>functional. So, how does one use that with EUPHORIA? Is that a job for
>>Rob Craig? :)
>>    
>>
>It would be a lot easier to learn Python.
>
If I remember correctly about my looking at Python, Python sucks... Of 
all those "other" languages, I think I liked Ruby the most. However, I 
won't be going elsewhere anytime soon...

Unless... of course... I need to. :/

>In addition, since wxWindows uses GTK on Linux, there's no 
>difference in appearance compared to programs written in plain GTK. 
>  
>
I thought some of the Linux screenshots looked similar in appearance to 
your GTK stuff. :)

new topic     » goto parent     » topic index » view message » categorize

7. Re: Irv's GTK Stuff

Irv Mullins wrote:

>
>
>On Tuesday 04 November 2003 08:12 pm, you wrote:
>  
>
>>Irv, I'd love to use your GTK stuff if you'd tell me how to create a
>>eugtk.so for FreeBSD...
>>    
>>
>You can compile it with the command:
>gcc -Wall -shared eugtk.c -o eugtk.so `gtk-config --cflags --libs`
>
>Let me know how this works.
>  
>
Okay, looks promising... I get this output when I type in the above command:

eugtk.c: In function 'GetEUID':
eugtk.c:464: warning:implicit declaration of function 'geteuid'

i do have a eugtk.so file now... does that mean it was a success? what
about that error message?

new topic     » goto parent     » topic index » view message » categorize

8. Re: Irv's GTK Stuff

Irv wrote:

> It would be a lot easier to learn Python.

Well, there's wxLua, wxPerl, wxBasic... even wxEuphoria. 

It would be a lot easier to write wxEuphoria by adding it into the Euphoria 
source than to write a DLL to link to. For example, you'd probably want 
Euphoria to keep track of objects and manage their lifetime.

If I were to do it, I'd probably wrap wxWindows objects in a sequence 
containing something like:

   { MagicNumber1, MagicNumber2, pointer, class, temp flag }

and then hack Euphoria's sequence destructor so that it would check to see if 
the sequence was in that form, and if so, call the pointer's destructor if 
the temp flag was set to true. That way, you would get reference counting on 
the pointers for free.

The wrappers might looks something like this:

   wxCall( wrapped pointer, function name, { args } )

If anyone is interested in this, I've got from my own projects that could be 
used for this.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

9. Re: Irv's GTK Stuff

On Wednesday 05 November 2003 09:00 pm, CK wrote:

> Okay, looks promising... I get this output when I type in the above
> command:
>
> eugtk.c: In function 'GetEUID':
> eugtk.c:464: warning:implicit declaration of function 'geteuid'
>
> i do have a eugtk.so file now... does that mean it was a success? what
> about that error message?

(I see in Euman's forum, you posted more details, so I reply here to both)

I don't know where to begin with this. One thing might be to find out whether 
the problem is with the Euphoria part, or with the GTK setup. To do that, 
you could try to compile and run a GTK program written in C.

Go to http://gtk.org and choose the 2.0 tutorial. Pick a couple of example 
programs from that tutorial and compile them. If they work ok, then we 
have to look at the libraries that Euphoria calls. 

You could write a little eu program which just opens a single library, and 
try each in turn until you see which one causes the error.

Irv

-- 
Windows 98 is *NOT* a virus - viruses are small and efficient.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Irv's GTK Stuff

Irv Mullins wrote:

>On Wednesday 05 November 2003 09:00 pm, CK wrote:
>  
>
>>Okay, looks promising... I get this output when I type in the above
>>command:
>>
>>eugtk.c: In function 'GetEUID':
>>eugtk.c:464: warning:implicit declaration of function 'geteuid'
>>
>>i do have a eugtk.so file now... does that mean it was a success? what
>>about that error message?
>>    
>>
>(I see in Euman's forum, you posted more details, so I reply here to both)
>
>I don't know where to begin with this. One thing might be to find out whether 
>the problem is with the Euphoria part, or with the GTK setup. To do that, 
>you could try to compile and run a GTK program written in C.
>
>Go to http://gtk.org and choose the 2.0 tutorial. Pick a couple of example 
>programs from that tutorial and compile them. If they work ok, then we 
>have to look at the libraries that Euphoria calls. 
>  
>
Thanks, Irv... I'll try tonight and let you know. What's your preferred 
path of contact, preferably an IM client of some sort. :)

new topic     » goto parent     » topic index » view message » categorize

11. Re: Irv's GTK Stuff

Matt Lewis wrote:

> It's actually possible to compile wxWindows to a DLL/SO and use it that
> way.  It's a project I've been working on (and off) for about a year.

I've looked at wxEuphoria, although I haven't played with it yet. There were 
some sort of dire warnings that I was paying attention to... blink

I was under the impression that you had this Real Ugly Hack (tm) that you had 
to do in order to resolve addresses in the DLL. Has this been replaced by 
something elegant?

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

12. Re: Irv's GTK Stuff

Matt Lewis wrote:

> Originally, I was using ordinals, which was awful (and Windows
> specific).  What I ended up doing was using Dependency Viewer to get a
> decorated and undecorated list of the functions.  I think this only
> works for MSVC name decoration, though, which was what I compiled with.
> On Linux, I used whatever the Linux command is that reads the exported
> symbols in a .so file.

OK, I'll have a look at it. 

Thanks!

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

13. Re: Irv's GTK Stuff

Irv Mullins wrote:

>I don't know where to begin with this. One thing might be to find out whether 
>the problem is with the Euphoria part, or with the GTK setup. To do that, 
>you could try to compile and run a GTK program written in C.
>
>Go to http://gtk.org and choose the 2.0 tutorial. Pick a couple of example 
>programs from that tutorial and compile them. If they work ok, then we 
>have to look at the libraries that Euphoria calls. 
>
Compiled "hello_world.c" and it worked! woo hoo!
Compiled their "scribble" program and it worked too! yiiiippeeee!

>You could write a little eu program which just opens a single library, and 
>try each in turn until you see which one causes the error.
>
I guess that means I need to start reading some docs. :/

-ck

new topic     » goto parent     » topic index » view message » categorize

14. Re: Irv's GTK Stuff

C. K. Lester wrote:

>
> Irv Mullins wrote:
>
>> I don't know where to begin with this. One thing might be to find out 
>> whether the problem is with the Euphoria part, or with the GTK setup. 
>> To do that, you could try to compile and run a GTK program written in C.
>>
>> Go to http://gtk.org and choose the 2.0 tutorial. Pick a couple of 
>> example programs from that tutorial and compile them. If they work 
>> ok, then we have to look at the libraries that Euphoria calls.
>
> Compiled "hello_world.c" and it worked! woo hoo!
> Compiled their "scribble" program and it worked too! yiiiippeeee!
>
>> You could write a little eu program which just opens a single 
>> library, and try each in turn until you see which one causes the error.
>
Irv, I tried running the simplest program you have: window.exu. It 
errored out with this:

$exu window.exu
/usr/libexec/ld-elf.so.1: /usr/local/lib/libintl.so.5: Undefined symbol 
"stpcpy"

First, am I running it right with "exu window.exu?"
Second, ....
Third, I guess I could turn my EU program into a .c file with the 
EU-to-C program, then compile with gcc... right? :)

new topic     » goto parent     » topic index » view message » categorize

15. Re: Irv's GTK Stuff

On Tuesday 11 November 2003 01:30 am, you wrote:

> Irv, I tried running the simplest program you have: window.exu. It
> errored out with this:
>
> $exu window.exu
> /usr/libexec/ld-elf.so.1: /usr/local/lib/libintl.so.5: Undefined symbol
> "stpcpy"
>
> First, am I running it right with "exu window.exu?"

Yes.

> Second, ....
> Third, I guess I could turn my EU program into a .c file with the
> EU-to-C program, then compile with gcc... right? :)

Probably not. 
If I recall correctly, you're using GTK 2.2? If so, try this test and let me 
know where if fails:

include dll.e

---------------------------------------------------
-- Adjust the following to match the library
-- versions you have in /usr/lib;
---------------------------------------------------
constant lib =
 {
  "libgtk-x11-2.0.so.0",    -- GTK
  "libgdk-x11-2.0.so.0",    -- GDK
  "libgobject-2.0.so.0",    -- GOBJ
  "libglib-2.0.so.0",       -- GLIB
  "libgdk_pixbuf-2.0.so.0", -- PIXBUF
  "libpango-1.0.so.0"       -- PANGO
 }
---------------------------------------------------
-- Don't edit below this line
---------------------------------------------------
global constant
 GLIB = open_dll(lib[1]),
 GOBJ = open_dll(lib[2]),
 GDK  = open_dll(lib[3]),
 GTK  = open_dll(lib[4]),
 PIXBUF = open_dll(lib[5]),
 PANGO  = open_dll(lib[6])

sequence test -- see if all libraries loaded properly;
test = {GLIB,GOBJ,GDK,GTK,PIXBUF,PANGO}= {0,0,0,0,0,0}
for i = 1 to length(test) do
 if test[i] != 0 then
    printf(1,"Error loading %s\n",{lib[i]})
    abort(i)
else
   printf(1,"Loaded %s OK\n",{lib[i]})
 end if
end for

Irv

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu