1/* Copyright (C) 2007-2008 The Android Open Source Project
2**
3** This software is licensed under the terms of the GNU General Public
4** License version 2, as published by the Free Software Foundation, and
5** may be copied, distributed, and modified under those terms.
6**
7** This program is distributed in the hope that it will be useful,
8** but WITHOUT ANY WARRANTY; without even the implied warranty of
9** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10** GNU General Public License for more details.
11*/
12#ifndef _ANDROID_SKIN_TRACKBALL_H
13#define _ANDROID_SKIN_TRACKBALL_H
14
15#include <SDL.h>
16#include "android/skin/rect.h"
17
18typedef struct SkinTrackBall  SkinTrackBall;
19
20typedef struct SkinTrackBallParameters
21{
22    int       diameter;
23    int       ring;
24    unsigned  ball_color;
25    unsigned  dot_color;
26    unsigned  ring_color;
27}
28SkinTrackBallParameters;
29
30
31extern SkinTrackBall*  skin_trackball_create  ( SkinTrackBallParameters*  params );
32extern void            skin_trackball_rect    ( SkinTrackBall*  ball, SDL_Rect*  rect );
33extern int             skin_trackball_contains( SkinTrackBall*  ball, int  x, int  y );
34extern int             skin_trackball_move    ( SkinTrackBall*  ball, int  dx, int  dy );
35extern void            skin_trackball_refresh ( SkinTrackBall*  ball );
36extern void            skin_trackball_draw    ( SkinTrackBall*  ball, int  x, int  y, SDL_Surface*  dst );
37extern void            skin_trackball_destroy ( SkinTrackBall*  ball );
38
39/* this sets the rotation that will be applied to mouse events sent to the system */
40extern void            skin_trackball_set_rotation( SkinTrackBall*  ball, SkinRotation  rotation);
41
42#endif /* END */
43
44