btedit

btedit — buzztrax graphical editor application

Functions

Includes

#include "bt-edit.h"

Description

Implements the body of the buzztrax GUI editor.

You can try to run the uninstalled program via

1
libtool --mode=execute buzztrax-edit

to enable debug output add:

1
2
--gst-debug="*:2,bt-*:3" for not-so-much-logdata or
--gst-debug="*:2,bt-*:4" for a-lot-logdata

Example songs can be found in ./test/songs/.

Functions

gdk_pixbuf_new_from_theme ()

GdkPixbuf *
gdk_pixbuf_new_from_theme (const gchar *name,
                           gint size);

Creates a new pixbuf image from the icon name and size .

Parameters

name

the icon name

 

size

the pixel size

 

Returns

a new pixbuf, g_object_unref() when done.


gtk_toolbar_get_style_from_string ()

GtkToolbarStyle
gtk_toolbar_get_style_from_string (const gchar *style_name);

toolbar gconf to style conversion

Parameters

style_name

the style name returned from gconf settings

 

Returns

the style id


gtk_target_table_make ()

GtkTargetEntry *
gtk_target_table_make (GdkAtom format_atom,
                       gint *n_targets);

Generate the target table for pasting to clipboard. Use gtk_target_table_free (targets, n_targets);

Parameters

format_atom

format atom for the target list

 

n_targets

out variable for the size of the table

 

Returns

the table and the size in the out variable n_targets


gtk_show_uri_simple ()

void
gtk_show_uri_simple (GtkWidget *widget,
                     const gchar *uri);

Show the given uri . Uses same screen as widget .

Parameters

widget

widget that triggered the action

 

uri

the uri

 

bt_toolbar_style_changed ()

gboolean
bt_toolbar_style_changed (GBinding *binding,
                          const GValue *from_value,
                          GValue *to_value,
                          gpointer user_data);

Transform function to be used with g_object_bind_property_full()

Parameters

binding

the binding

 

from_value

the source value

 

to_value

the target value

 

user_data

unused

 

Returns

TRUE for successful sync of the properties


bt_label_value_changed ()

gboolean
bt_label_value_changed (GBinding *binding,
                        const GValue *from_value,
                        GValue *to_value,
                        gpointer user_data);

Transform function to be used with g_object_bind_property_full()

Parameters

binding

the binding

 

from_value

the source value

 

to_value

the target value

 

user_data

the label formatstring

 

Returns

TRUE for successful sync of the properties


bt_pointer_to_boolean ()

gboolean
bt_pointer_to_boolean (GBinding *binding,
                       const GValue *from_value,
                       GValue *to_value,
                       gpointer user_data);

Transform function to be used with g_object_bind_property_full()

Parameters

binding

the binding

 

from_value

the source value

 

to_value

the target value

 

user_data

the label formatstring

 

Returns

TRUE for successful sync of the properties


gtk_tool_button_new_from_icon_name ()

GtkToolItem *
gtk_tool_button_new_from_icon_name (const gchar *icon_name,
                                    const gchar *label);

Creates a new GtkToolButton containing icon_name as contents and label as label.

Parameters

icon_name

the name of the themed icon.

[allow-none]

label

a string that will be used as label, or NULL.

[allow-none]

Returns

the new GtkToolItem


gtk_toggle_tool_button_new_from_icon_name ()

GtkToolItem *
gtk_toggle_tool_button_new_from_icon_name
                               (const gchar *icon_name,
                                const gchar *label);

Creates a new GtkToggleToolButton containing icon_name as contents and label as label.

Parameters

icon_name

the name of the themed icon.

[allow-none]

label

a string that will be used as label, or NULL.

[allow-none]

Returns

the new GtkToolItem


BtNotifyFunc ()

void
(*BtNotifyFunc) (GObject *object,
                 GParamSpec *pspec,
                 gpointer user_data);

Callback function for “notify”.

Parameters

object

the object

 

pspec

the arg

 

user_data

the extra data

 

bt_notify_idle_dispatch ()

void
bt_notify_idle_dispatch (GObject *object,
                         GParamSpec *pspec,
                         gpointer user_data,
                         BtNotifyFunc func);

Save the parameters from a “notify” callback, run it through g_idle_add(), unpack the params and call func .

Parameters

object

the object

 

pspec

the arg

 

user_data

the extra data

 

func

the actual callback

 

bt_gtk_workarea_size ()

void
bt_gtk_workarea_size (gint *max_width,
                      gint *max_height);

Gets the potitial max size the window could occupy. This can be used to hint the content size for GtkScrelledWindow.

Parameters

max_width

destination for the width or NULL

 

max_height

destination for the heigth or NULL

 

bt_strjoin_list ()

char *
bt_strjoin_list (GList *list);

Concatenates the strings using a newline. There is no final newline.

Parameters

list

a list of test nodes

 

Returns

a new string, Free after use.

See Also

BtEditApplication