Audacious
$Id:Doxyfile42802007-03-2104:39:00Znenolod$
Main Page
Related Pages
Classes
Files
File List
File Members
src
audacious
preferences.h
Go to the documentation of this file.
1
/*
2
* preferences.h
3
* Copyright 2007-2011 Tomasz Moń, William Pitcock, and John Lindgren
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright notice,
9
* this list of conditions, and the following disclaimer.
10
*
11
* 2. Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions, and the following disclaimer in the documentation
13
* provided with the distribution.
14
*
15
* This software is provided "as is" and without any warranty, express or
16
* implied. In no event shall the authors be liable for any damages arising from
17
* the use of this software.
18
*/
19
20
#ifndef AUDACIOUS_PREFERENCES_H
21
#define AUDACIOUS_PREFERENCES_H
22
23
#include <
audacious/types.h
>
24
25
typedef
enum
{
26
WIDGET_NONE
,
27
WIDGET_CHK_BTN
,
28
WIDGET_LABEL
,
29
WIDGET_RADIO_BTN
,
30
WIDGET_SPIN_BTN
,
31
WIDGET_CUSTOM
,
/* 'custom' widget, you hand back the widget you want to add --nenolod */
32
WIDGET_FONT_BTN
,
33
WIDGET_TABLE
,
34
WIDGET_ENTRY
,
35
WIDGET_COMBO_BOX
,
36
WIDGET_BOX
,
37
WIDGET_NOTEBOOK
,
38
WIDGET_SEPARATOR
,
39
}
WidgetType
;
40
41
typedef
enum
{
42
VALUE_INT
,
43
VALUE_FLOAT
,
44
VALUE_BOOLEAN
,
45
VALUE_STRING
,
46
VALUE_NULL
,
47
}
ValueType
;
48
49
typedef
struct
{
50
void
*
value
;
51
const
char
*
label
;
52
}
ComboBoxElements
;
53
54
struct
_NotebookTab;
55
56
struct
_PreferencesWidget
{
57
WidgetType
type
;
/* widget type */
58
const
char
*
label
;
/* widget title (for SPIN_BTN it's text left to widget) */
59
void
*
cfg
;
/* connected config value */
60
void (*
callback
) (void);
/* this func will be called after value change, can be NULL */
61
const
char
*
tooltip
;
/* widget tooltip, can be NULL */
62
bool_t
child
;
63
ValueType
cfg_type
;
/* connected value type */
64
const
char
*
csect
;
/* config file section */
65
const
char
*
cname
;
/* config file key name */
66
67
union
{
68
struct
{
69
int
value
;
70
}
radio_btn
;
71
72
struct
{
73
double
min
,
max
,
step
;
74
const
char
*
right_label
;
/* text right to widget */
75
}
spin_btn
;
76
77
struct
{
78
struct
_PreferencesWidget
*
elem
;
79
int
rows
;
80
}
table
;
81
82
struct
{
83
const
char
*
stock_id
;
84
bool_t
single_line
;
/* FALSE to enable line wrap */
85
}
label
;
86
87
struct
{
88
const
char
*
title
;
89
}
font_btn
;
90
91
struct
{
92
bool_t
password
;
93
}
entry
;
94
95
struct
{
96
const
ComboBoxElements
*
elements
;
97
int
n_elements
;
98
}
combo
;
99
100
struct
{
101
const
struct
_PreferencesWidget
*
elem
;
102
int
n_elem
;
103
104
bool_t
horizontal
;
/* FALSE gives vertical, TRUE gives horizontal aligment of child widgets */
105
bool_t
frame
;
/* whether to draw frame around box */
106
}
box
;
107
108
struct
{
109
const
struct
_NotebookTab *
tabs
;
110
int
n_tabs
;
111
}
notebook
;
112
113
struct
{
114
bool_t
horizontal
;
/* FALSE gives vertical, TRUE gives horizontal separator */
115
}
separator
;
116
117
/* for WIDGET_CUSTOM --nenolod */
118
/* GtkWidget * (* populate) (void); */
119
void
* (* populate) (void);
120
}
data
;
121
};
122
123
typedef
struct
_NotebookTab {
124
const
char
*
name
;
125
const
PreferencesWidget *
widgets
;
126
int
n_widgets
;
127
}
NotebookTab
;
128
129
struct
_PluginPreferences
{
130
const
PreferencesWidget *
widgets
;
131
int
n_widgets
;
132
133
void (*
init
)(void);
134
void (*
apply
)(void);
135
void (*
cleanup
)(void);
136
};
137
138
#endif
/* AUDACIOUS_PREFERENCES_H */
_PreferencesWidget::horizontal
bool_t horizontal
Definition:
preferences.h:104
_PluginPreferences::widgets
const PreferencesWidget * widgets
Definition:
preferences.h:130
WIDGET_ENTRY
Definition:
preferences.h:34
_PreferencesWidget::box
struct _PreferencesWidget::@23::@31 box
_PreferencesWidget::elem
struct _PreferencesWidget * elem
Definition:
preferences.h:78
types.h
WIDGET_FONT_BTN
Definition:
preferences.h:32
_PreferencesWidget::stock_id
const char * stock_id
Definition:
preferences.h:83
_PluginPreferences::cleanup
void(* cleanup)(void)
Definition:
preferences.h:135
_PreferencesWidget::font_btn
struct _PreferencesWidget::@23::@28 font_btn
_PreferencesWidget::title
const char * title
Definition:
preferences.h:88
WIDGET_COMBO_BOX
Definition:
preferences.h:35
VALUE_BOOLEAN
Definition:
preferences.h:44
VALUE_STRING
Definition:
preferences.h:45
_PreferencesWidget::single_line
bool_t single_line
Definition:
preferences.h:84
_PreferencesWidget::data
union _PreferencesWidget::@23 data
_PluginPreferences::apply
void(* apply)(void)
Definition:
preferences.h:134
_PreferencesWidget::separator
struct _PreferencesWidget::@23::@33 separator
_PreferencesWidget::elem
const struct _PreferencesWidget * elem
Definition:
preferences.h:101
_PreferencesWidget::n_tabs
int n_tabs
Definition:
preferences.h:110
_PreferencesWidget::table
struct _PreferencesWidget::@23::@26 table
_PluginPreferences::init
void(* init)(void)
Definition:
preferences.h:133
_PreferencesWidget::max
double max
Definition:
preferences.h:73
WIDGET_CHK_BTN
Definition:
preferences.h:27
bool_t
Index Index bool_t
Definition:
playlist-api.h:122
WIDGET_SPIN_BTN
Definition:
preferences.h:30
_PreferencesWidget::n_elements
int n_elements
Definition:
preferences.h:97
_PreferencesWidget::frame
bool_t frame
Definition:
preferences.h:105
_PreferencesWidget::elements
const ComboBoxElements * elements
Definition:
preferences.h:96
VALUE_INT
Definition:
preferences.h:42
NotebookTab
Definition:
preferences.h:123
_PluginPreferences
Definition:
preferences.h:129
_PreferencesWidget::cname
const char * cname
Definition:
preferences.h:65
_PreferencesWidget::radio_btn
struct _PreferencesWidget::@23::@24 radio_btn
_PreferencesWidget::min
double min
Definition:
preferences.h:73
_PreferencesWidget::spin_btn
struct _PreferencesWidget::@23::@25 spin_btn
_PluginPreferences::n_widgets
int n_widgets
Definition:
preferences.h:131
WIDGET_CUSTOM
Definition:
preferences.h:31
NotebookTab::widgets
const PreferencesWidget * widgets
Definition:
preferences.h:125
WIDGET_SEPARATOR
Definition:
preferences.h:38
VALUE_NULL
Definition:
preferences.h:46
ComboBoxElements
Definition:
preferences.h:49
NotebookTab::name
const char * name
Definition:
preferences.h:124
_PreferencesWidget::step
double step
Definition:
preferences.h:73
WIDGET_RADIO_BTN
Definition:
preferences.h:29
_PreferencesWidget::csect
const char * csect
Definition:
preferences.h:64
_PreferencesWidget::combo
struct _PreferencesWidget::@23::@30 combo
ComboBoxElements::value
void * value
Definition:
preferences.h:50
_PreferencesWidget::entry
struct _PreferencesWidget::@23::@29 entry
_PreferencesWidget::cfg_type
ValueType cfg_type
Definition:
preferences.h:63
_PreferencesWidget::n_elem
int n_elem
Definition:
preferences.h:102
_PreferencesWidget::password
bool_t password
Definition:
preferences.h:92
_PreferencesWidget::tabs
const struct _NotebookTab * tabs
Definition:
preferences.h:109
WIDGET_LABEL
Definition:
preferences.h:28
_PreferencesWidget::value
int value
Definition:
preferences.h:69
_PreferencesWidget::rows
int rows
Definition:
preferences.h:79
_PreferencesWidget::right_label
const char * right_label
Definition:
preferences.h:74
_PreferencesWidget::callback
void(* callback)(void)
Definition:
preferences.h:60
_PreferencesWidget::tooltip
const char * tooltip
Definition:
preferences.h:61
WIDGET_NOTEBOOK
Definition:
preferences.h:37
WIDGET_BOX
Definition:
preferences.h:36
_PreferencesWidget::cfg
void * cfg
Definition:
preferences.h:59
_PreferencesWidget::type
WidgetType type
Definition:
preferences.h:57
ValueType
ValueType
Definition:
preferences.h:41
_PreferencesWidget
Definition:
preferences.h:56
WIDGET_NONE
Definition:
preferences.h:26
ComboBoxElements::label
const char * label
Definition:
preferences.h:51
WIDGET_TABLE
Definition:
preferences.h:33
WidgetType
WidgetType
Definition:
preferences.h:25
_PreferencesWidget::label
const char * label
Definition:
preferences.h:58
VALUE_FLOAT
Definition:
preferences.h:43
_PreferencesWidget::notebook
struct _PreferencesWidget::@23::@32 notebook
_PreferencesWidget::child
bool_t child
Definition:
preferences.h:62
NotebookTab::n_widgets
int n_widgets
Definition:
preferences.h:126
Generated by
1.8.6