libxputty  0.1
A damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces
xmeter_private.h
Go to the documentation of this file.
1 /*
2  * 0BSD
3  *
4  * BSD Zero Clause License
5  *
6  * Copyright (c) 2019 Hermann Meyer
7  *
8  * Permission to use, copy, modify, and/or distribute this software for any
9  * purpose with or without fee is hereby granted.
10 
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  *
19  */
20 
21 #pragma once
22 
23 #ifndef XMETER_PRIVATE_H_
24 #define XMETER_PRIVATE_H_
25 
26 #include "xmeter.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
33 /**
34  * @brief _draw_meter_scale - draw a meter scale beside the meter widget
35  * @param w - the widget to draw to
36  * @return void
37  */
38 
39 void _draw_vmeter_scale(void *w_, void* user_data);
40 
41 /**
42  * @brief _draw_hmeter_scale - draw a hmeter scale beside the meter widget
43  * @param w - the widget to draw to
44  * @return void
45  */
46 
47 void _draw_hmeter_scale(void *w_, void* user_data);
48 
49 /**
50  * @brief _log_meter - logaritmic meter deflection
51  * @param db - mesured db
52  * @return float - state to show on the meter
53  */
54 
55 float _log_meter (float db);
56 
57 /**
58  * @brief _create_vertical_meter_image - internal draw the meter image
59  * to the cairo image surface
60  * @param *w - pointer to the Widget_t meter
61  * @param width - widget width
62  * @param height - widget height
63  * @return void
64  */
65 
66 void _create_vertical_meter_image(Widget_t *w, int width, int height);
67 
68 /**
69  * @brief _create_horizontal_meter_image - internal draw the meter image
70  * to the cairo image surface
71  * @param *w - pointer to the Widget_t meter
72  * @param width - widget width
73  * @param height - widget height
74  * @return void
75  */
76 
77 void _create_horizontal_meter_image(Widget_t *w, int width, int height);
78 
79 /**
80  * @brief _draw_v_meter - internal draw the meter to the buffer
81  * @param *w_ - void pointer to the Widget_t button
82  * @param *user_data - void pointer to attached user_data
83  * @return void
84  */
85 
86 void _draw_v_meter(void *w_, void* user_data);
87 
88 /**
89  * @brief _draw_h_meter - internal draw the meter to the buffer
90  * @param *w_ - void pointer to the Widget_t button
91  * @param *user_data - void pointer to attached user_data
92  * @return void
93  */
94 
95 void _draw_h_meter(void *w_, void* user_data);
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif //XMETER_PRIVATE_H_
_draw_vmeter_scale
void _draw_vmeter_scale(void *w_, void *user_data)
_draw_meter_scale - draw a meter scale beside the meter widget
Definition: xmeter_private.c:25
_draw_h_meter
void _draw_h_meter(void *w_, void *user_data)
_draw_h_meter - internal draw the meter to the buffer
Definition: xmeter_private.c:270
_create_vertical_meter_image
void _create_vertical_meter_image(Widget_t *w, int width, int height)
_create_vertical_meter_image - internal draw the meter image to the cairo image surface
Definition: xmeter_private.c:138
_create_horizontal_meter_image
void _create_horizontal_meter_image(Widget_t *w, int width, int height)
_create_horizontal_meter_image - internal draw the meter image to the cairo image surface
Definition: xmeter_private.c:194
_draw_v_meter
void _draw_v_meter(void *w_, void *user_data)
_draw_v_meter - internal draw the meter to the buffer
Definition: xmeter_private.c:250
Widget_t
Widget_t - struct to hold the basic Widget_t info.
Definition: xwidget.h:298
_draw_hmeter_scale
void _draw_hmeter_scale(void *w_, void *user_data)
_draw_hmeter_scale - draw a hmeter scale beside the meter widget
Definition: xmeter_private.c:69
_log_meter
float _log_meter(float db)
_log_meter - logaritmic meter deflection
Definition: xmeter_private.c:109
xmeter.h