Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 25 Jul 2014, 14:22
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Need to manage cursor position & other things fron c program
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
benny7440


Joined: 20 Apr 2009
Posts: 416

PostPosted: Sat 25 Aug 2012, 16:50    Post subject:  Need to manage cursor position & other things fron c program
Subject description: Was overviewing my threads for SDL but didn't find it...
 

... someone somewhere gave me the advise to d/l SDL for having those capabilities as to include some special characters anywhere in the screen with an arbitrary orientation: I started many months ago a game that needs the whole screen, putting there at some spots a graphic in one of the possible orientations & changing the background color without loosing any characters or graphics already there.

The problem I had then was caused by myself for deleting everything that included "glade" in its name (blindly). So, I stopped for about 2 months my c program until I managed my mess. Finally I did d/l a newer version of Puppy Linux (528.005) but didn't continued my c program. Now I want to finish it before I completely forget all/most of what I've learned.

I asked more or less the same thing many months ago but failed to receive any replies to it, that post is at: http://www.murga-linux.com/puppy/viewtopic.php?t=77874

Where I can go to learn what other/new commands Iĺl have with SDL? Do I need something extra apart from SDL?

Thanks to all!

_________________
Sony VAIO VGN AR250G Notebook + 512MB RAM.
Need color of cables of 2 connectors at top & down side of Dell monitor 1704FPTt (look through vents at right side at the back)

Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4278

PostPosted: Sun 26 Aug 2012, 23:33    Post subject:  

What exactly are you wanting to do? Get cursor position, warp it to a specific location,...? And what other stuff.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 779

PostPosted: Mon 27 Aug 2012, 01:18    Post subject:  

The SDL man-pages holds loads of info:
Code:
SDL_WarpMouse(3)               SDL API Reference              SDL_WarpMouse(3)

NAME
       SDL_WarpMouse - Set the position of the mouse cursor.

SYNOPSIS
       #include "SDL.h"

       void SDL_WarpMouse(Uint16 x, Uint16 y);

DESCRIPTION
       Set  the position of the mouse cursor (generates a mouse motion event).

SEE ALSO
       SDL_MouseMotionEvent

SDL                         Tue 11 Sep 2001, 23:01            SDL_WarpMouse(3)

Depending on you project you might need other SDL-libs (SDL_mixer/SDL_net/SDL_GUI/SDL_image)...
Back to top
View user's profile Send private message Visit poster's website 
benny7440


Joined: 20 Apr 2009
Posts: 416

PostPosted: Mon 27 Aug 2012, 15:12    Post subject:  

Thanks, technosaurus & goingnuts, for replying!

My program is for playing dominoes against the "machine' & for that I need an array of graphics to show at the screen; it would not hurt if I could include some sound files there, too.

About the SDL links to visit, that will have to wait until a thunderstorm near my home goes away; probably tonight might be a good moment, sorry... I'll post anything regarding this last thing after reading about it.

_________________
Sony VAIO VGN AR250G Notebook + 512MB RAM.
Need color of cables of 2 connectors at top & down side of Dell monitor 1704FPTt (look through vents at right side at the back)

Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4278

PostPosted: Mon 27 Aug 2012, 22:06    Post subject:  

I wrote a really stupid simple game framework in gtk (It compiles to ~2kb) that just draws images, lines, shapes, text ... (anything supported by svg) and returns all locations of mouse clicks and key presses.
http://www.murga-linux.com/puppy/viewtopic.php?t=80352
I designed it for use with scripting languages like bash, lua, tcl, perl, python etc... but it will work with anything that can read streams (like stdin) and can write files (for instance game.svg) ... should work great for dominoes. If you aren't dead set on SDL, feel free to use it as is or adapt it -- released to public domain or any OSI approved license with no warranty.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0490s ][ Queries: 11 (0.0032s) ][ GZIP on ]