Geany  dev
Typedefs | Enumerations | Functions
build.h File Reference

Interface to the Build menu functionality. More...

Typedefs

typedef enum GeanyBuildCmdEntries GeanyBuildCmdEntries
 The entries of a command for a menu item.
 

Enumerations

enum  GeanyBuildCmdEntries
 The entries of a command for a menu item.
 
enum  GeanyBuildGroup
 Groups of Build menu items. More...
 
enum  GeanyBuildSource
 Build menu item sources in increasing priority.
 

Functions

void build_activate_menu_item (const GeanyBuildGroup grp, const guint cmd)
 Activate the menu item. More...
 
const gchar * build_get_current_menu_item (const GeanyBuildGroup grp, const guint cmd, const GeanyBuildCmdEntries field)
 Get the string for the menu item field. More...
 
guint build_get_group_count (const GeanyBuildGroup grp)
 Get the count of commands for the group. More...
 
void build_remove_menu_item (const GeanyBuildSource src, const GeanyBuildGroup grp, const gint cmd)
 Remove the specified Build menu item. More...
 
void build_set_menu_item (const GeanyBuildSource src, const GeanyBuildGroup grp, const guint cmd, const GeanyBuildCmdEntries field, const gchar *value)
 Set the string for the menu item field. More...
 

Detailed Description

Interface to the Build menu functionality.

Enumeration Type Documentation

Groups of Build menu items.

Function Documentation

void build_activate_menu_item ( const GeanyBuildGroup  grp,
const guint  cmd 
)

Activate the menu item.

Activate the menu item specified by grp and cmd.

Parameters
grpthe group of the specified menu item.
cmdthe index of the command within the group.
const gchar* build_get_current_menu_item ( const GeanyBuildGroup  grp,
const guint  cmd,
const GeanyBuildCmdEntries  fld 
)

Get the string for the menu item field.

Get the current highest priority command specified by grp and cmd. This is the one that the menu item will use if activated.

Parameters
grpthe group of the specified menu item.
cmdthe index of the command within the group.
fldthe field to return
Returns
a pointer to the constant string or NULL if it doesn't exist. This is a pointer to an internal structure and must not be freed.
guint build_get_group_count ( const GeanyBuildGroup  grp)

Get the count of commands for the group.

Get the number of commands in the group specified by grp.

Parameters
grpthe group of the specified menu item.
Returns
a count of the number of commands in the group
void build_remove_menu_item ( const GeanyBuildSource  src,
const GeanyBuildGroup  grp,
const gint  cmd 
)

Remove the specified Build menu item.

Makes the specified menu item configuration no longer exist. This is different to setting fields to blank because the menu item will be deleted from the configuration file on saving (except the system filetypes settings

See Also
Build Menu Configuration section of the Manual).
Parameters
srcthe source of the menu item to remove.
grpthe group of the command to remove.
cmdthe index (from 0) of the command within the group. A negative value will remove the whole group.

If any parameter is out of range does nothing.

Updates the menu.

void build_set_menu_item ( const GeanyBuildSource  src,
const GeanyBuildGroup  grp,
const guint  cmd,
const GeanyBuildCmdEntries  fld,
const gchar *  val 
)

Set the string for the menu item field.

Set the specified field of the command specified by src, grp and cmd.

Parameters
srcthe source of the menu item
grpthe group of the specified menu item.
cmdthe index of the menu item within the group.
fldthe field in the menu item command to set
valthe value to set the field to, is copied