LMMS
Loading...
Searching...
No Matches
ctl_led.h
Go to the documentation of this file.
1/* Calf DSP Library
2 * Light emitting diode-like control.
3 *
4 * Copyright (C) 2008 Krzysztof Foltman
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
20 */
21
22#ifndef CALF_CTL_LED_H
23#define CALF_CTL_LED_H
24
25#include <gtk/gtk.h>
26
27G_BEGIN_DECLS
28
29#define CALF_TYPE_LED (calf_led_get_type())
30#define CALF_LED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_LED, CalfLed))
31#define CALF_IS_LED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_LED))
32#define CALF_LED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_LED, CalfLedClass))
33#define CALF_IS_LED_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_LED))
34#define CALF_LED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALF_TYPE_LED, CalfLedClass))
35
37struct CalfLed
38{
39 GtkDrawingArea parent;
40 cairo_surface_t *cache_surface;
42 int size;
43 float led_value;
44};
45
48{
49 GtkDrawingAreaClass parent_class;
50};
51
53extern GtkWidget *calf_led_new();
54
56extern GType calf_led_get_type();
57
59extern void calf_led_set_value(CalfLed *led, float value);
60
62extern gboolean calf_led_get_value(CalfLed *led);
63
64G_END_DECLS
65
66#endif
void calf_led_set_value(CalfLed *led, float value)
Set LED state (true - lit, false - unlit).
Definition ctl_led.cpp:237
gboolean calf_led_get_value(CalfLed *led)
Get LED state (true - lit, false - unlit).
Definition ctl_led.cpp:252
GtkWidget * calf_led_new()
Create new CalfLed.
Definition ctl_led.cpp:28
GType calf_led_get_type()
Get GObject type for the CalfLed.
Definition ctl_led.cpp:258
static PuglViewHint int value
Definition pugl.h:1708
Class object for CalfLed.
Definition ctl_led.h:48
GtkDrawingAreaClass parent_class
Definition ctl_led.h:49
Instance object for CalfLed.
Definition ctl_led.h:38
int size
Definition ctl_led.h:42
int led_mode
Definition ctl_led.h:41
cairo_surface_t * cache_surface
Definition ctl_led.h:40
float led_value
Definition ctl_led.h:43
GtkDrawingArea parent
Definition ctl_led.h:39