libxputty
0.1
A damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces
xtuner.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 XTUNER_H_
24
#define XTUNER_H_
25
26
#include "
xputty.h
"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
33
typedef
struct
{
34
float
ref_freq
;
35
float
temperament
;
36
int
temp_adjust
;
37
}
XTuner
;
38
39
void
tuner_set_temperament
(
Widget_t
*w,
float
temp);
40
41
void
tuner_set_ref_freq
(
Widget_t
*w,
float
ref);
42
43
/**
44
* @brief add_tuner - add a tuner widget to a Widget_t
45
* @param *parent - pointer to the Widget_t request the tuner
46
* @param *label - Label to show on the tuner
47
* @param x,y,width,height - the position/geometry to create the tuner
48
* @return Widget_t* - pointer to the Widget_t tuner struct
49
*/
50
51
Widget_t
*
add_tuner
(
Widget_t
*parent,
const
char
* label,
52
int
x,
int
y,
int
width,
int
height);
53
54
#ifdef __cplusplus
55
}
56
#endif
57
58
#endif //XTUNER_H_
XTuner
Definition:
xtuner.h:33
tuner_set_ref_freq
void tuner_set_ref_freq(Widget_t *w, float ref)
Definition:
xtuner.c:36
xputty.h
XTuner::temperament
float temperament
Definition:
xtuner.h:35
tuner_set_temperament
void tuner_set_temperament(Widget_t *w, float temp)
Definition:
xtuner.c:25
Widget_t
Widget_t - struct to hold the basic Widget_t info.
Definition:
xwidget.h:298
XTuner::temp_adjust
int temp_adjust
Definition:
xtuner.h:36
add_tuner
Widget_t * add_tuner(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_tuner - add a tuner widget to a Widget_t
Definition:
xtuner.c:47
XTuner::ref_freq
float ref_freq
Definition:
xtuner.h:34
libxputty
xputty
header
widgets
xtuner.h
Generated by
1.8.17