|
libxputty
0.1
A damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces
|
|
Go to the documentation of this file.
26 float min_value,
float max_value,
float step,
CL_type type) {
35 .std_value = powf(10,(std_value/adj->
log_scale)),
37 .min_value = powf(10,(min_value/adj->
log_scale)),
38 .max_value = powf(10,(max_value/adj->
log_scale)),
40 .start_value = powf(10,(value/adj->
log_scale)),
49 .std_value = log10(std_value),
50 .value = log10(value),
51 .min_value = log10(min_value),
52 .max_value = log10(max_value),
54 .start_value = log10(value),
63 .std_value = std_value,
65 .min_value = min_value,
66 .max_value = max_value,
81 float min_value,
float max_value,
float step,
CL_type type) {
89 .std_value = powf(10,(std_value/adj->
log_scale)),
91 .min_value = powf(10,(min_value/adj->
log_scale)),
92 .max_value = powf(10,(max_value/adj->
log_scale)),
94 .start_value = powf(10,(value/adj->
log_scale)),
103 .std_value = log10(std_value),
104 .value = log10(value),
105 .min_value = log10(min_value),
106 .max_value = log10(max_value),
108 .start_value = log10(value),
117 .std_value = std_value,
119 .min_value = min_value,
120 .max_value = max_value,
122 .start_value = value,
143 float nvalue =
min(1.0,
max(0.0,state));
149 if (!adj)
return 0.0;
155 if (!adj)
return 0.0;
159 return powf(10,adj->
value);
201 float mulscale = round(prevalue/wid->
adj_x->
step);
226 float mulscale = round(prevalue/wid->
adj_y->
step);
242 debug_print(
"Adjustment_t check_value_changed %f\n", *(value));
243 if(fabs(*(value) - adj->
value)>=0.00001) {
244 adj->
value = *(value);
void adj_set_log_scale(Adjustment_t *adj, float value)
adj_set_log_scale - internal use to set the logarithmic scale
CL_type
CL_type - define the type of the controller adjustment one of this types must be given when set up a ...
void adj_set_value(Adjustment_t *adj, float v)
adj_set_value - set the current value to the Adjustment_t
float adj_get_state(Adjustment_t *adj)
adj_get_state - get the current state of the Adjustment_t
#define min(x, y)
min - set a maximal value (x) as return value
void adj_set_motion_state(void *w, float x, float y)
adj_set_motion_state - internal use to set value and state of the Adjustment_t on mouse pointer movme...
Adjustment_t * add_adjustment(Widget_t *w, float std_value, float value, float min_value, float max_value, float step, CL_type type)
*add_adjustment - adding a adjustment to a Widget_t
void * delete_adjustment(Adjustment_t *adj)
delete_adjustment - freeing the memory of the Adjustment_t You usually don't need to call this,...
void adj_set_scale(Adjustment_t *adj, float value)
adj_set_scale - internal use to scale the pointer movement (0.1 -1.0)
void set_adjustment(Adjustment_t *adj, float std_value, float value, float min_value, float max_value, float step, CL_type type)
*set_adjustment - set a new range to a existing Adjustment_t it will be created if it not exsits yet
Adjustment_t - struct to hold a controller adjustment.
#define debug_print(...)
debug_print - print out state messages when compiled with the -DDEBUG flag
float adj_get_value(Adjustment_t *adj)
adj_get_value - get the current value of the Adjustment_t
void adj_set_start_value(void *w)
adj_set_start_value - internal use to store the value when pointer movment starts
#define max(x, y)
max - set a minimal value (x) as return value
void adj_set_state(Adjustment_t *adj, float state)
adj_set_state - set the current state of the Adjustment_t
xevfunc value_changed_callback
void check_value_changed(Adjustment_t *adj, float *value)
check_value_changed - check if Adjustment_t value have changed and send value_changed_callback (VALUE...