Пример #1
0
void
ags_add_line_member_launch(AgsTask *task)
{
    AgsAddLineMember *add_line_member;

    add_line_member = AGS_ADD_LINE_MEMBER(task);

    if(AGS_IS_LINE(add_line_member->line)) {
        ags_expander_add(AGS_LINE(add_line_member->line)->expander,
                         add_line_member->line_member,
                         add_line_member->x, add_line_member->y,
                         add_line_member->width, add_line_member->height);
    } else if(AGS_IS_EFFECT_LINE(add_line_member->line)) {
        gtk_table_attach(AGS_EFFECT_LINE(add_line_member->line)->table,
                         add_line_member->line_member,
                         add_line_member->x, add_line_member->x + add_line_member->width,
                         add_line_member->y, add_line_member->y + add_line_member->height,
                         GTK_FILL, GTK_FILL,
                         0, 0);
        gtk_widget_show_all(AGS_EFFECT_LINE(add_line_member->line)->table);
    } else {
        g_warning("ags_add_line_member.c - unknow line type");
    }

    ags_line_member_find_port(add_line_member->line_member);

    //  gtk_widget_set_child_visible(GTK_BIN(add_line_member->line->expander)->child,
    //			       TRUE);
}
Пример #2
0
void
ags_synth_input_line_resolve_line(AgsFileLookup *file_lookup,
				  AgsSynthInputLine *synth_input_line)
{
  ags_expander_add(AGS_LINE(synth_input_line)->expander,
		   GTK_WIDGET(synth_input_line->oscillator),
		   0, 0,
		   1, 1);
}
void
ags_panel_input_line_init(AgsPanelInputLine *panel_input_line)
{
  AgsLineMember *line_member;

  line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER,
					       "widget-type\0", GTK_TYPE_CHECK_BUTTON,
					       "widget-label\0", "mute\0",
					       "plugin-name\0", "ags-play\0",
					       "specifier\0", "./muted[0]\0",
					       "control-port\0", "2/2\0",
					       NULL);
  ags_expander_add(AGS_LINE(panel_input_line)->expander,
		   GTK_WIDGET(line_member),
		   0, 0,
		   1, 1);
}
Пример #4
0
void
ags_synth_input_line_init(AgsSynthInputLine *synth_input_line)
{
  AgsOscillator *oscillator;

  synth_input_line->name = NULL;
  synth_input_line->xml_type = "ags-synth-input-line";

  /* oscillator */
  oscillator = ags_oscillator_new();
  synth_input_line->oscillator = oscillator;
  ags_expander_add(AGS_LINE(synth_input_line)->expander,
		   GTK_WIDGET(oscillator),
		   0, 0,
		   1, 1);

  g_signal_connect((GObject *) synth_input_line, "samplerate-changed",
		   G_CALLBACK(ags_synth_input_line_samplerate_changed_callback), NULL);
}
Пример #5
0
void
ags_drum_input_line_init(AgsDrumInputLine *drum_input_line)
{
  AgsLineMember *line_member;
  GtkWidget *widget;

  g_signal_connect_after((GObject *) drum_input_line, "parent_set\0",
			 G_CALLBACK(ags_drum_input_line_parent_set_callback), (gpointer) drum_input_line);

  line_member = (AgsLineMember *) g_object_new(AGS_TYPE_LINE_MEMBER,
					       "widget-type\0", GTK_TYPE_VSCALE,
					       "plugin-name\0", "ags-volume\0",
					       "specifier\0", "./volume[0]\0",
					       "control-port\0", "1/1\0",
					       NULL);
  ags_expander_add(AGS_LINE(drum_input_line)->expander,
		   GTK_WIDGET(line_member),
		   0, 0,
		   1, 1);

  widget = gtk_bin_get_child(GTK_BIN(line_member));

  gtk_scale_set_digits(GTK_SCALE(widget),
		       3);

  gtk_range_set_range(GTK_RANGE(widget),
		      0.0, 2.00);
  gtk_range_set_increments(GTK_RANGE(widget),
			   0.025, 0.1);
  gtk_range_set_value(GTK_RANGE(widget),
		      1.0);
  gtk_range_set_inverted(GTK_RANGE(widget),
			 TRUE);

  gtk_widget_set_size_request(widget,
			      -1, 100);

  g_object_set(G_OBJECT(line_member),
	       "port-data\0", (gpointer) &(GTK_RANGE(widget)->adjustment->value),
	       NULL);
}