geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

build.h File Reference

Interface to the Build menu functionality. More...

#include "document.h"
#include "filetypes.h"
#include "gtkcompat.h"
Include dependency graph for build.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

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

Enumerations

enum  GeanyBuildGroup { GEANY_GBG_FT , GEANY_GBG_NON_FT , GEANY_GBG_EXEC , GEANY_GBG_COUNT }
 Groups of Build menu items. More...
 
enum  GeanyBuildSource {
  GEANY_BCS_DEF , GEANY_BCS_FT , GEANY_BCS_HOME_FT , GEANY_BCS_PREF ,
  GEANY_BCS_PROJ_FT , GEANY_BCS_PROJ , GEANY_BCS_COUNT
}
 Build menu item sources in increasing priority. More...
 
enum  GeanyBuildCmdEntries { GEANY_BC_LABEL , GEANY_BC_COMMAND , GEANY_BC_WORKING_DIR , GEANY_BC_CMDENTRIES_COUNT }
 The entries of a command for a menu item. More...
 

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...
 
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...
 
guint build_get_group_count (const GeanyBuildGroup grp)
 Get the count of commands for the group. More...
 

Detailed Description

Interface to the Build menu functionality.

Definition in file build.h.

Typedef Documentation

◆ GeanyBuildCmdEntries

The entries of a command for a menu item.

Enumeration Type Documentation

◆ GeanyBuildCmdEntries

The entries of a command for a menu item.

Enumerator
GEANY_BC_LABEL 

The menu item label, _ marks mnemonic.

GEANY_BC_COMMAND 

The command to run.

GEANY_BC_WORKING_DIR 

The directory to run in.

GEANY_BC_CMDENTRIES_COUNT 

Count of entries.

Definition at line 55 of file build.h.

◆ GeanyBuildGroup

Groups of Build menu items.

Enumerator
GEANY_GBG_FT 

filetype items

GEANY_GBG_NON_FT 

non filetype items.

GEANY_GBG_EXEC 

execute items

GEANY_GBG_COUNT 

count of groups.

Definition at line 34 of file build.h.

◆ GeanyBuildSource

Build menu item sources in increasing priority.

Enumerator
GEANY_BCS_DEF 

Default values.

GEANY_BCS_FT 

System filetype values.

GEANY_BCS_HOME_FT 

Filetypes in ~/.config/geany/filedefs.

GEANY_BCS_PREF 

Preferences file ~/.config/geany/geany.conf.

GEANY_BCS_PROJ_FT 

Project file filetype command.

GEANY_BCS_PROJ 

Project file if open.

GEANY_BCS_COUNT 

Count of sources.

Definition at line 43 of file build.h.

Function Documentation

◆ build_activate_menu_item()

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.

Definition at line 693 of file build.c.

References GRP_CMD_TO_POINTER, NULL, and on_build_menu_item().

◆ build_get_current_menu_item()

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.

Definition at line 607 of file build.c.

References build_groups_count, GEANY_BC_CMDENTRIES_COUNT, GEANY_BC_COMMAND, GEANY_BC_LABEL, GEANY_BC_WORKING_DIR, GEANY_GBG_COUNT, get_build_cmd(), and NULL.

◆ build_get_group_count()

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

Definition at line 2660 of file build.c.

References build_groups_count, and GEANY_GBG_COUNT.

◆ build_remove_menu_item()

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.

Definition at line 546 of file build.c.

References build_groups_count, get_build_group(), and NULL.

Referenced by destroy_project().

◆ build_set_menu_item()

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

Definition at line 648 of file build.c.

References build_groups_count, build_menu_update(), command, GEANY_BC_CMDENTRIES_COUNT, GEANY_BC_COMMAND, GEANY_BC_LABEL, GEANY_BC_WORKING_DIR, GEANY_BCS_COUNT, GEANY_GBG_COUNT, get_build_group_pointer(), label, NULL, SETPTR, and working_dir.