Unix Programming - Graphic dev with C

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2007 > Graphic dev with C





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Graphic dev with C
m.impini@gmail.com

2007-04-02, 7:20 pm

Hello,
i'd like to learn the graphic development under BSD, particulary
freeBSD, with the C language.
I know X11 is the standart window manager, so I suppose there's some
API to use it with C right?
I'm looking on google but can't find some tutorial, infos, etc. about
"how to create a simple window", I'm pretty good with C under windows
but still a newbie in Unix programing, so could you explain me if
there are some dependencies to download to make such a program? I just
have the standart X11 installed (basic CD installation) and I suppose
it's not enough to develop my own tools...
thanks for helping!

Michael Ekstrand

2007-04-02, 7:20 pm

On Mon, 02 Apr 2007 12:48:17 -0700, m.impini wrote:
> i'd like to learn the graphic development under BSD, particulary
> freeBSD, with the C language.


Excellent.

> I know X11 is the standart window manager, so I suppose there's some
> API to use it with C right?


Slightly incorrect. X11 is the standard graphics/windowing system -
another program runs as your window manager to place/manipulate windows,
and there is no standard one. Some use KDE's KWin, some GNOME's Metacity,
others blackbox, icewm, mwm, take your pick...

> I'm looking on google but can't find some tutorial, infos, etc. about
> "how to create a simple window", I'm pretty good with C under windows
> but still a newbie in Unix programing, so could you explain me if
> there are some dependencies to download to make such a program? I just
> have the standart X11 installed (basic CD installation) and I suppose
> it's not enough to develop my own tools...


You can program X11 directly, but that's probably the hard way.
There exist a number of toolkits to ease graphics programming on X11. If
you're in C, GTK+ (http://www.gtk.org) is probably your best bet. GTK+
has an excellent tutorial and rather good reference documentation. Other
options include Motif and Xaw.

- Michael
Mark Hobley

2007-04-02, 7:20 pm

m.impini@gmail.com wrote:
> Hello,
> i'd like to learn the graphic development under BSD, particulary
> freeBSD, with the C language.
> I know X11 is the standart window manager, so I suppose there's some
> API to use it with C right?


I don't know whether or not GTK is used on BSD, but the "GTK Hello World"
tutorial worked for me, but I use GNU/Linux.

There is an X11/Xlib tutorial, which does the same thing, but interfaces to
the X library directly without the toolkit. This may be what you want, but I
have not yet tried this here.

Google "X11 hello world" or "GTK hello world" and hit "I'm Feeling Lucky".

Google is your friend.

Regards,

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

Vallabha

2007-04-03, 7:20 am

On Apr 3, 12:48 am, m.imp...@gmail.com wrote:
> Hello,
> i'd like to learn the graphic development under BSD, particulary
> freeBSD, with the C language.
> I know X11 is the standart window manager, so I suppose there's some
> API to use it with C right?
> I'm looking on google but can't find some tutorial, infos, etc. about
> "how to create a simple window", I'm pretty good with C under windows
> but still a newbie in Unix programing, so could you explain me if
> there are some dependencies to download to make such a program? I just
> have the standart X11 installed (basic CD installation) and I suppose
> it's not enough to develop my own tools...
> thanks for helping!


X11 is bit hard, as far as programming is concerned. You can think of
using Motif (Xm) which is built on X11 and Xt. Xm has almost all basic
widgets, what Windows can offer.

Cheers
-Vallabha
S7 Software Solutions
http://www.s7solutions.com/

Barry

2007-04-13, 7:18 pm


"Vallabha" <vsnadagouda@gmail.com> wrote in message
news:1175581766.349217.64870@p77g2000hsh.googlegroups.com...
> On Apr 3, 12:48 am, m.imp...@gmail.com wrote:
>
> X11 is bit hard, as far as programming is concerned. You can think of
> using Motif (Xm) which is built on X11 and Xt. Xm has almost all basic
> widgets, what Windows can offer.
>
> Cheers
> -Vallabha
> S7 Software Solutions
> http://www.s7solutions.com/
>


This is the first time I have looked at this newsgroup. Did Motif suddenly
become free? I know that they lost record of my license do to their lack of
responsibility.


Eric Meijer

2007-04-14, 7:20 am

Barry wrote:
> This is the first time I have looked at this newsgroup. Did Motif suddenly
> become free? I know that they lost record of my license do to their lack of
> responsibility.


There is a free clone called "lesstif": http://www.lesstif.org/

I have no first hand experience, but I know at least the "ddd" debugger
(http://www.gnu.org/software/ddd/) works with it.

Eric
Bjorn Reese

2007-04-15, 7:17 am

Barry wrote:

> This is the first time I have looked at this newsgroup. Did Motif suddenly
> become free? I know that they lost record of my license do to their lack of
> responsibility.


http://www.openmotif.org/

--
mail1dotstofanetdotdk
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com