utils

utils

Functions

const gchar * get_user_data_dir ()
const gchar * locateprintdir ()
#define processenter()
void drawbitmapinverse_cr ()
void drawfetachar_cr ()
void drawnormaltext_cr ()
void drawlargetext_cr ()
void drawtext_cr ()
gint draw_for_directives ()
gint space_after ()
gint calculateheight ()
gint offsettonumber ()
gchar * mid_c_offsettolily ()
gchar mid_c_offsettoname ()
gint mid_c_offsettooctave ()
void set_grace_numticks ()
void set_tuplefied_numticks ()
void set_basic_numticks ()
void setpixelmin ()
void freeit ()
void popup_menu ()
void warningmessage ()
void warningdialog ()
GtkWidget * infodialog ()
GtkWindow * progressbar ()
void progressbar_stop ()
void busy_cursor ()
void normal_cursor ()
void headerfields ()
void initdir ()
const gchar * get_system_data_dir ()
const gchar * get_system_locale_dir ()
const gchar * get_system_bin_dir ()
const gchar * get_system_font_dir ()
const gchar * get_executable_dir ()
void kill_process ()
gchar * music_font ()
void set_title_bar ()
void score_status ()
void write_status ()
gboolean confirm ()
void nullify_gstring ()
gchar * string_dialog_entry ()
gchar * string_dialog_entry_with_widget ()
gchar * string_dialog_editor_with_widget ()
gchar * string_dialog_entry_with_widget_opt ()
gchar * string_dialog_editor_with_widget_opt ()
void note2lilynotename ()
void note2lilyaccidental ()
void note2lilyoctave ()
void chord2lilybaseduration ()
void chord2lilyduration ()
void chord2lilynumdots ()
#define UTILS_H_PARAM_ASSIGN()
#define GET_1PARAM()
#define GET_2PARAMS()
#define GET_3PARAMS()
#define GET_4PARAMS()
gchar * get_option ()
void console_output ()
gint get_override ()
void add_font_directory ()
void add_font_file ()
const gchar * get_prefix_dir ()
gboolean run_file_association ()
gchar * make_temp_dir ()
gchar * remove_extension ()
gchar * substitute_extension ()
void init_denemo_notenames ()
gint get_widget_height ()
gint get_widget_width ()
void switch_back_to_main_window ()
void use_markup ()
void initialize_keystroke_help ()
void KeyStrokeAwait ()
void KeyStrokeDecline ()
void KeyStrokeShow ()
void MouseGestureShow ()
void KeyPlusMouseGestureShow ()
void display_current_object ()
note * findnote ()
#define get_label_for_command()
#define get_tooltip_for_command()
#define get_menu_path_for_command()
void write_input_status ()
enum clefs cleftypefromname ()
gchar * find_dir_for_file ()
gchar * find_path_for_file ()
gchar * find_denemo_file ()

Types and Values

#define DENEMO_REMINDER
#define DENEMO_CAUTIONARY
#define HIGHLIGHT_OFFSET
#define MAXEXTRASPACE
#define LINE_SPACE
#define HALF_LINE_SPACE
#define NO_OF_LINES
#define STAFF_HEIGHT
#define LYRICS_HEIGHT
#define MID_STAFF_HEIGHT
extern gint LEFT_MARGIN
#define SPACE_FOR_TIME
#define RIGHT_MARGIN
#define SPACE_FOR_BARLINE
#define HALF_BARLINE_SPACE
#define WHOLE_NUMTICKS
#define FONT
#define TIMESIGFONT
enum DenemoShortcutType

Description

Functions

get_user_data_dir ()

const gchar *
get_user_data_dir (gboolean create);

locateprintdir ()

const gchar *
locateprintdir (void);

processenter()

#define             processenter(entry, callback,  cbdata, dialog)

drawbitmapinverse_cr ()

void
drawbitmapinverse_cr (cairo_t *cr,
                      DenemoGraphic *mask,
                      gint x,
                      gint y,
                      gboolean invert);

drawfetachar_cr ()

void
drawfetachar_cr (cairo_t *cr,
                 gunichar uc,
                 double x,
                 double y);

drawnormaltext_cr ()

void
drawnormaltext_cr (cairo_t *cr,
                   const char *text,
                   double x,
                   double y);

drawlargetext_cr ()

void
drawlargetext_cr (cairo_t *cr,
                  const char *text,
                  double x,
                  double y);

drawtext_cr ()

void
drawtext_cr (cairo_t *cr,
             const char *text,
             double x,
             double y,
             double size);

draw_for_directives ()

gint
draw_for_directives (cairo_t *cr,
                     GList *directives,
                     gint x,
                     gint y,
                     gboolean at_cursor);

space_after ()

gint
space_after (gint numticks,
             gint wholenotewidth);

calculateheight ()

gint
calculateheight (gint mid_c_offset,
                 gint dclef);

offsettonumber ()

gint
offsettonumber (gint n);

mid_c_offsettolily ()

gchar *
mid_c_offsettolily (int mid_c_offset,
                    int enshift);

mid_c_offsettoname ()

gchar
mid_c_offsettoname (gint mid_c_offset);

mid_c_offsettooctave ()

gint
mid_c_offsettooctave (gint mid_c_offset);

set_grace_numticks ()

void
set_grace_numticks (DenemoObject *theobj,
                    gint multiplier);

set_tuplefied_numticks ()

void
set_tuplefied_numticks (DenemoObject *theobj,
                        gint numerator,
                        gint denominator);

set_basic_numticks ()

void
set_basic_numticks (DenemoObject *theobj);

setpixelmin ()

void
setpixelmin (DenemoObject *theobj);

freeit ()

void
freeit (gpointer data,
        gpointer user_data);

popup_menu ()

void
popup_menu (gchar *name);

warningmessage ()

void
warningmessage (gchar *msg);

warningdialog ()

void
warningdialog (gchar *msg);

infodialog ()

GtkWidget *
infodialog (gchar *msg);

progressbar ()

GtkWindow *
progressbar (gchar *msg,
             gpointer callback);

progressbar_stop ()

void
progressbar_stop (void);

busy_cursor ()

void
busy_cursor (GtkWidget *area);

normal_cursor ()

void
normal_cursor (GtkWidget *area);

headerfields ()

void
headerfields (GtkWidget *dialog,
              GtkListStore *list_store,
              GtkTreeIter *iter,
              DenemoMovement *si,
              gboolean isdialog);

initdir ()

void
initdir (void);

get_system_data_dir ()

const gchar *
get_system_data_dir (void);

get_system_locale_dir ()

const gchar *
get_system_locale_dir (void);

get_system_bin_dir ()

const gchar *
get_system_bin_dir (void);

get_system_font_dir ()

const gchar *
get_system_font_dir (void);

get_executable_dir ()

const gchar *
get_executable_dir (void);

kill_process ()

void
kill_process (GPid pid);

music_font ()

gchar *
music_font (gchar *str);

set_title_bar ()

void
set_title_bar (DenemoProject *gui);

score_status ()

void
score_status (DenemoProject *gui,
              gboolean change);

write_status ()

void
write_status (DenemoProject *gui);

confirm ()

gboolean
confirm (gchar *primary,
         gchar *secondary);

nullify_gstring ()

void
nullify_gstring (GString **s);

string_dialog_entry ()

gchar *
string_dialog_entry (DenemoProject *gui,
                     gchar *title,
                     gchar *instruction,
                     gchar *initial_value);

string_dialog_entry_with_widget ()

gchar *
string_dialog_entry_with_widget (DenemoProject *gui,
                                 gchar *title,
                                 gchar *instruction,
                                 gchar *initial_value,
                                 GtkWidget *extra_widget);

string_dialog_editor_with_widget ()

gchar *
string_dialog_editor_with_widget (DenemoProject *gui,
                                  gchar *wlabel,
                                  gchar *direction,
                                  gchar *PreValue,
                                  GtkWidget *widget,
                                  gpointer keypress_callback);

string_dialog_entry_with_widget_opt ()

gchar *
string_dialog_entry_with_widget_opt (DenemoProject *gui,
                                     gchar *wlabel,
                                     gchar *direction,
                                     gchar *PreValue,
                                     GtkWidget *widget,
                                     gboolean modal);

string_dialog_editor_with_widget_opt ()

gchar *
string_dialog_editor_with_widget_opt (DenemoProject *gui,
                                      gchar *wlabel,
                                      gchar *direction,
                                      gchar *PreValue,
                                      GtkWidget *widget,
                                      gboolean modal,
                                      gpointer keypress_callback);

note2lilynotename ()

void
note2lilynotename (struct note *noteobject,
                   GString *ret);

note2lilyaccidental ()

void
note2lilyaccidental (struct note *noteobject,
                     GString *ret);

note2lilyoctave ()

void
note2lilyoctave (struct note *noteobject,
                 GString *ret);

chord2lilybaseduration ()

void
chord2lilybaseduration (struct chord *chordobject,
                        GString *ret);

chord2lilyduration ()

void
chord2lilyduration (struct chord *chordobject,
                    GString *ret);

chord2lilynumdots ()

void
chord2lilynumdots (struct chord *chordobject,
                   GString *ret);

UTILS_H_PARAM_ASSIGN()

#define             UTILS_H_PARAM_ASSIGN(param_name)

GET_1PARAM()

#define             GET_1PARAM(action, param, param_name)

GET_2PARAMS()

#define             GET_2PARAMS(action, param, param_name1, param_name2)

GET_3PARAMS()

#define             GET_3PARAMS(action, param, param_name1, param_name2, param_name3)

GET_4PARAMS()

#define             GET_4PARAMS(action, param, param_name1, param_name2, param_name3, param_name4)

get_option ()

gchar *
get_option (gchar *title,
            gchar *str,
            gint length);

console_output ()

void
console_output (gchar *text);

get_override ()

gint
get_override (GList *g);

add_font_directory ()

void
add_font_directory (gchar *fontpath);

add_font_file ()

void
add_font_file (gchar *fontpath);

get_prefix_dir ()

const gchar *
get_prefix_dir (void);

run_file_association ()

gboolean
run_file_association (gchar *filenam);

make_temp_dir ()

gchar *
make_temp_dir (gboolean removal);

remove_extension ()

gchar *
remove_extension (gchar *name);

substitute_extension ()

gchar *
substitute_extension (gchar *name,
                      gchar *extension);

init_denemo_notenames ()

void
init_denemo_notenames (void);

get_widget_height ()

gint
get_widget_height (GtkWidget *w);

get_widget_width ()

gint
get_widget_width (GtkWidget *w);

switch_back_to_main_window ()

void
switch_back_to_main_window (void);

use_markup ()

void
use_markup (GtkWidget *widget);

initialize_keystroke_help ()

void
initialize_keystroke_help (void);

KeyStrokeAwait ()

void
KeyStrokeAwait (gchar *first_keypress);

KeyStrokeDecline ()

void
KeyStrokeDecline (gchar *first_keypress);

KeyStrokeShow ()

void
KeyStrokeShow (gchar *str,
               gint command_idx,
               DenemoShortcutType type);

MouseGestureShow ()

void
MouseGestureShow (gchar *str,
                  gchar *help,
                  DenemoShortcutType type);

KeyPlusMouseGestureShow ()

void
KeyPlusMouseGestureShow (gchar *str,
                         gint command_idx);

display_current_object ()

void
display_current_object (void);

findnote ()

note *
findnote (DenemoObject *curObj,
          gint cursory);

get_label_for_command()

#define get_label_for_command(name) lookup_label_from_idx(Denemo.map, lookup_command_from_name(Denemo.map, name))

get_tooltip_for_command()

#define get_tooltip_for_command(name) lookup_tooltip_from_idx(Denemo.map, lookup_command_from_name(Denemo.map, name))

get_menu_path_for_command()

#define get_menu_path_for_command(name) lookup_menu_path_from_idx(Denemo.map, lookup_command_from_name(Denemo.map, name))

write_input_status ()

void
write_input_status ();

cleftypefromname ()

enum clefs
cleftypefromname (gchar *str);

find_dir_for_file ()

gchar *
find_dir_for_file (gchar *filename,
                   GList *dirs);

Finds the first dir in the list that contains 'filename', and free the array.

Parameters

filename

The file to search

 

dirs

A dir paths array, ending by NULL, where to search.

 

Returns

The dir path if found, NULL either


find_path_for_file ()

gchar *
find_path_for_file (gchar *filename,
                    GList *dirs);

Finds the first dir in the list that contains 'filename', and free the array.

Parameters

filename

The file to search

 

dirs

A dir paths list, where to search.

 

Returns

The file path if found, NULL either


find_denemo_file ()

gchar *
find_denemo_file (DenemoDirectory dir,
                  gchar *filename);

Types and Values

DENEMO_REMINDER

#define DENEMO_REMINDER (2)

DENEMO_CAUTIONARY

#define DENEMO_CAUTIONARY (3)

HIGHLIGHT_OFFSET

#define HIGHLIGHT_OFFSET (20)   /* Fairly arbitrary value to transform codes '0', '1' ... to a new range with the meaning highlight the whole-note, half-note, ..., glyph */

MAXEXTRASPACE

#define MAXEXTRASPACE (150)     /* maximum space for ledger lines, for sanity */

LINE_SPACE

#define LINE_SPACE 10

HALF_LINE_SPACE

#define HALF_LINE_SPACE 5

NO_OF_LINES

#define NO_OF_LINES 5

STAFF_HEIGHT

#define STAFF_HEIGHT (LINE_SPACE * (NO_OF_LINES - 1))

LYRICS_HEIGHT

#define LYRICS_HEIGHT (STAFF_HEIGHT/2)

MID_STAFF_HEIGHT

#define MID_STAFF_HEIGHT 2*LINE_SPACE

LEFT_MARGIN

extern gint LEFT_MARGIN;

SPACE_FOR_TIME

#define SPACE_FOR_TIME 35

RIGHT_MARGIN

#define RIGHT_MARGIN 20

SPACE_FOR_BARLINE

#define SPACE_FOR_BARLINE 10

HALF_BARLINE_SPACE

#define HALF_BARLINE_SPACE 5

WHOLE_NUMTICKS

#define WHOLE_NUMTICKS 1536

FONT

#define FONT "Sans 9"

TIMESIGFONT

#define TIMESIGFONT "Sans 24"

enum DenemoShortcutType

Members

TwoKey

   

SingleKey

   

MouseGesture

   

KeyPlusMouse