LinuxQuestions.org
Visit Jeremy's Blog.
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 02-01-2006, 10:23 AM   #1
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
Xlib programming : getting a screenshot.


hi,

i'm currently doing some programming using Xlib.
( building a simple window manager as a study-case )

i'm looking for a way to get a screenshot or grab a part of the screen.
programs like kde-snapshot use the QTtools to do that, but i don't
want to use QT.

does anyone know a way to get to the screendata directly, and
how to interpret that data,
or where to find some usable info on that topic ?

egag
 
Old 02-01-2006, 11:03 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by egag
i'm currently doing some programming using Xlib.
( building a simple window manager as a study-case )

i'm looking for a way to get a screenshot or grab a part of the screen.
programs like kde-snapshot use the QTtools to do that, but i don't
want to use QT.
Both XFree86 and Xorg come with a small program to take screenshots. It called "xwd". Try having a look at the sources for xwd.
 
Old 02-01-2006, 03:16 PM   #3
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Original Poster
Rep: Reputation: 53
that might be an option.
i don't think it's gonna be fast though.

but when i try to compile using parts of it,
i get strange syntax errors.

like ( from a header file ):

Code:
extern int GetMultiVisualRegions(Display *, Window, int, int,
unsigned int,unsigned int,
int *, int *, XVisualInfo **, int *, OverlayInfo  **,
int *, XVisualInfo ***, list_ptr *,list_ptr *, int *);
...gives ' error: syntax error before "OverlayInfo" '
while i don't see the error ?
( it's rather old code )

any idea what that can be ?

egag
 
Old 02-01-2006, 03:47 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Original Poster
Rep: Reputation: 53
ah...solved that...
just the wrong sequence of includes.
thanks.

egag
 
  


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
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Linux - Newbie 12 11-27-2018 01:30 PM
Screenshot? carlosinfl Linux - Software 5 06-11-2005 08:16 PM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Programming 1 03-02-2004 08:22 AM
screenshot asianboi2k Linux - Software 3 08-05-2003 11:14 AM

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

All times are GMT -5. The time now is 08:40 AM.

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