/* * main.c * * Test widget * * (C) 2007, Ulrich Lorenz Schlueter * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Authors: * Ulrich Lorenz Schlueter */ #include #include "phatsvgknob.h" static void value_changed_cb (PhatSvgKnobFace *knob, double decibel, gpointer data) { g_print ("value-changed - %02f\n", decibel); } int main (int argc, char **argv) { GtkWidget *window; GtkWidget *knob; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); knob = phat_svg_knob_face_new (); gtk_widget_set_size_request (knob, 100, 100); gtk_container_add (GTK_CONTAINER (window), knob); g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL); g_signal_connect (knob, "value-changed", G_CALLBACK (value_changed_cb), NULL); gtk_widget_show_all (window); gtk_main (); }