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)
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.
23 #define SV_DIM_NO_X 0x100
24 #define SV_DIM_NO_Y 0x200
26 enum sv_dim_type
{ SV_DIM_CONTINUOUS
,
34 /* one or the other */
39 /* calls with the callback data and a state flag:
43 3: programmatic modification
45 void (*center_callback
)(sv_dim_list_t
*);
46 void (*bracket_callback
)(sv_dim_list_t
*);
49 typedef struct sv_dim_data
{
52 enum sv_dim_type type
;
67 typedef struct sv_dim_lookup
{
71 int (*callback
)(sv_dim_t
*);
74 _sv_dim_widget_t
**widget_list
;
76 int (*value_callback
)(sv_dim_t
*d
, void *data
);
77 void *value_callback_data
;
90 extern int _sv_dim_scales(sv_dim_t
*d
,
93 int panel_w
, int data_w
,
96 _sv_scalespace_t
*panel
,
97 _sv_scalespace_t
*data
,
98 _sv_scalespace_t
*iter
);
99 extern int _sv_dim_scales_from_panel(sv_dim_t
*d
,
100 _sv_scalespace_t panel
,
102 _sv_scalespace_t
*data
,
103 _sv_scalespace_t
*iter
);
105 extern int _sv_dim_set_thumb(sv_dim_t
*d
, int thumb
, double val
);
106 extern int _sv_dim_widget_set_thumb(_sv_dim_widget_t
*d
, int thumb
, double val
);
107 extern void _sv_dim_widget_set_thumb_active(_sv_dim_widget_t
*dw
, int thumb
, int active
);
108 extern _sv_dim_widget_t
*_sv_dim_widget_new(sv_dim_list_t
*dl
,
109 void (*center_callback
)(sv_dim_list_t
*),
110 void (*bracket_callback
)(sv_dim_list_t
*));
111 extern int _sv_dim_save(sv_dim_t
*d
, xmlNodePtr instance
);
112 extern int _sv_dim_load(sv_dim_t
*d
, _sv_undo_t
*u
, xmlNodePtr dn
, int warn
);