Re: Help with C Code in Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fedora Linux wrote:
> I am new to Linux and just installed Fedora 10 on my Machine. I wanted
> to develop graphical libraries using C (not C++). Can anyone please
> tell me if there is some place where I can download these graphical
> Libraries. For example if I want to display a pixel on the screen can
> someone please explain how I could do so using C

Do you want to have full control over drawing (e.g. for a game) or do you
want to write an application which looks like common desktop applications
(with "widgets", i.e. controls like menus, buttons and textboxes)?

For the first thing, you'll want something like SDL or Allegro. Those are
the most frequently used ones, but there are some more libraries like that
in Fedora too.

For the second thing, something like GTK+ (which is in C) or Qt (it's C++,
but it replaces most of the C++ standard library with better-designed
classes, so you may end up actually liking it - I used to hate C++ and only
like C before I started coding with Qt and KDE). In both cases, you will
quickly notice that you need to think in a more object-oriented way. There
aren't really any modern GUI toolkits which are strictly procedural. GTK+
uses some convoluted ways to write object-oriented code in C (macros,
structures with function pointers in them etc.), Qt uses C++ for it. IMHO
Qt's solution is better (and yes, I have worked with both), but I'm
biased. :-) So as a plain C programmer, you'll have to get used to the OO
paradigm (and also to event-based programming) to do GUI programming,
objects and events are the main concepts there, whether it's in C++ or in
OO-style C (like GTK+).

        Kevin Kofler

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux