LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-09-2010, 05:08 PM   #1
fpsasm
LQ Newbie
 
Registered: Feb 2010
Location: UK, Leeds
Distribution: PCLinuxOS, Fedora Core, SuSE,ubuntu
Posts: 20

Rep: Reputation: 1
Making a Window and populating it.. ( C program )


Hello, I am wanting to make a window (in linux, using a C program) and I want to populate it (I know the RGB value for each pixel, so I assume it will be a series of for loops) but I don't know where to start.

I know there is something called Qt and GTk (or something like that) do I use them? or OpenGL?

In addition to that, I want to add mouse functionality, so that I know where the mouse is in the window.

If you could also include some code to make a window (in any of your suggested methods) I would be ever so grateful..

Cheers,
Matthew
 
Old 03-09-2010, 05:12 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

There are lots of ways to make a window. Including Qt and GTK+ and OpenGL. And X Windows, SDL and many other choices. And languages.

Strong suggestion: from what you've said, I think SDL might be a good match for you. Please try a tutorial, and see what you think:

http://www.libsdl.org/tutorials.php

Good luck - and have fun!
 
1 members found this post helpful.
Old 03-09-2010, 05:15 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
http://www.amazon.com/Beginning-Linu.../dp/1874416680

Good discussion of the more popular tookits (QT and GTK)
 
1 members found this post helpful.
Old 03-10-2010, 04:54 AM   #4
fpsasm
LQ Newbie
 
Registered: Feb 2010
Location: UK, Leeds
Distribution: PCLinuxOS, Fedora Core, SuSE,ubuntu
Posts: 20

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by paulsm4 View Post
Hi -

There are lots of ways to make a window. Including Qt and GTK+ and OpenGL. And X Windows, SDL and many other choices. And languages.

Strong suggestion: from what you've said, I think SDL might be a good match for you. Please try a tutorial, and see what you think:

http://www.libsdl.org/tutorials.php

Good luck - and have fun!
Looks brilliant.. thanks for the info


Quote:
Originally Posted by pixellany View Post
http://www.amazon.com/Beginning-Linu.../dp/1874416680

Good discussion of the more popular tookits (QT and GTK)
K, I will have a look at it..


Cheers,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Metacity: when a program spawns a new window, that window is not in foreground. why? BrianK Linux - General 1 12-18-2008 05:50 AM
!! Problem !! Minimizing ANY window EXITS the Program / Browser window NOoBuntuLinux Linux - Newbie 6 11-20-2008 02:32 PM
Making the terminal window invisible. manolakis Programming 1 02-03-2007 10:31 PM
Window Maker: making a launcher hamish Linux - Software 1 03-24-2005 05:57 AM
Making window list transparent? matsgl Linux - Software 2 02-09-2005 03:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration