Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git] / sushivision / slice.h
blob857659eb9a7e6c76bd65582c05f9b9ab897e29cf
1 /*
3 * sushivision copyright (C) 2006-2007 Monty <monty@xiph.org>
5 * sushivision 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, or (at your option)
8 * any later version.
9 *
10 * sushivision 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.
15 * You should have received a copy of the GNU General Public License
16 * along with sushivision; see the file COPYING. If not, write to the
17 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef __SLICE_H__
23 #define __SLICE_H__
25 #include <sys/time.h>
26 #include <time.h>
27 #include <glib.h>
28 #include <glib-object.h>
29 #include <gtk/gtkcontainer.h>
30 #include <gtk/gtksignal.h>
32 G_BEGIN_DECLS
34 #define SLICE_TYPE (_sv_slice_get_type ())
35 #define SLICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SLICE_TYPE, _sv_slice_t))
36 #define SLICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SLICE_TYPE, _sv_slice_class_t))
37 #define IS_SLICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SLICE_TYPE))
38 #define IS_SLICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SLICE_TYPE))
40 typedef struct _sv_slice _sv_slice_t;
41 typedef struct _sv_slice_class _sv_slice_class_t;
43 typedef struct _sv_slider _sv_slider_t;
45 struct _sv_slice {
46 GtkWidget widget;
48 _sv_slider_t *slider;
49 int slicenum;
51 int thumb_active;
52 int thumb_focus;
53 int thumb_state;
54 int thumb_grab;
55 double thumb_val;
57 void (*callback)(void *,int);
58 void *callback_data;
60 void (*active_callback)(void *, int);
61 void *active_callback_data;
65 struct _sv_slice_class{
66 GtkWidgetClass parent_class;
67 void (*slice) (_sv_slice_t *s);
70 extern GType _sv_slice_get_type (void);
71 extern GtkWidget* _sv_slice_new (void (*callback)(void *,int), void *data);
72 extern void _sv_slice_set_active(_sv_slice_t *s, int activep);
73 extern void _sv_slice_thumb_set(_sv_slice_t *s,double v);
74 extern void _sv_slice_set_active_callback(_sv_slice_t *s, void (*callback)(void *,int), void *data);
75 G_END_DECLS
76 #endif