1b87d8747ac559b3b4e534304954f1fa4c0c8349
[stopish] / src / stopish.h
1 //      stopish.h
2 //
3 //      Copyright 2010 Michael Cronenworth <mike@cchtml.com>
4 //
5 //      This program is free software; you can redistribute it and/or modify
6 //      it under the terms of the GNU General Public License as published by
7 //      the Free Software Foundation; either version 2 of the License, or
8 //      (at your option) any later version.
9 //
10 //      This program is distributed in the hope that it will be useful,
11 //      but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //      GNU General Public License for more details.
14 //
15 //      You should have received a copy of the GNU General Public License
16 //      along with this program; if not, write to the Free Software
17 //      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 //      MA 02110-1301, USA.
19
20
21 #ifndef __STOPISH_H__
22 #define __STOPISH_H__
23
24 #include <libosso.h>
25
26 #define STOPISH_MODE_START  0
27 #define STOPISH_MODE_PAUSE  1
28 #define STOPISH_MODE_RESUME 2
29
30 #define STOPISH_PORTRAIT  0
31 #define STOPISH_LANDSCAPE 1
32
33 #define TIMER_PRECISION_HOUR   0
34 #define TIMER_PRECISION_MINUTE 1
35
36 // stopish.c
37 gint dbus_callback( const gchar *interface, const gchar *method,
38                         GArray *arguments, gpointer data, osso_rpc_t *retval );
39 int stopish_get_mode( void );
40 int stopish_get_orientation( void );
41 void stopish_set_mode( int newMode );
42
43 // stopish-stopwatch.c
44 GtkWindow *stopish_stopwatch_new( void );
45 void stopish_stopwatch_perf_timer_hour( GtkRadioButton* radio, GtkLabel *label );
46 void stopish_stopwatch_perf_timer_minute( GtkRadioButton* radio, GtkLabel *label );
47 void stopish_stopwatch_label_timer_landscape( void );
48 void stopish_stopwatch_label_timer_portrait( void );
49
50 // timer.c
51 char *stopish_get_time_string( void );
52 long int stopish_get_time_timer( void );
53 void stopish_set_time_start( long int time );
54 void stopish_timer_resume( void );
55 void stopish_timer_save( void );
56 long int stopish_current_time( void );
57 void stopish_timer_set_precision( int setting );
58 int stopish_timer_get_precision( void );
59
60 #endif