Beaver  0.4.1
Data Structures | Macros | Typedefs | Enumerations | Variables
API documentation

Data Structures

struct  beaver_text_selection_s
 
struct  beaver_regex_result_s
 

Macros

#define PLUGIN_AUTHOR(name_string)
 
#define PLUGIN_VERSION(version_string)
 
#define PLUGIN_INIT(func_handler)
 
#define PLUGIN_CLEANUP(func_handler)
 
#define PLUGIN_NAME(name_string)
 
#define PLUGIN_DESCRIPTION(descr_string)
 
#define PLUGIN_PREFERENCE(func_handler)
 

Typedefs

typedef struct beaver_text_selection_s BeaverTextSelection
 
typedef struct beaver_regex_result_s BeaverRegexResult
 

Enumerations

enum  BeaverMenuSection { BEAVER_SECTION_MENU_TOOLS = 0, BEAVER_SECTION_MENU_VIEW, BEAVER_SECTION_MENU_EDIT, BEAVER_SECTION_TOOLBAR }
 
enum  BeaverTextFormat { BEAVER_FORMAT_UNIX = 0, BEAVER_FORMAT_MAC, BEAVER_FORMAT_DOS }
 

Variables

void(* beaver_box_message )(gchar *message)
 
void(* beaver_box_error )(gchar *message)
 
gint(* beaver_box_question )(gchar *message)
 
gchar *(* beaver_box_prompt )(gchar *message)
 
gchar *(* beaver_box_file_selection )(gchar *title, GtkFileChooserAction action, const gchar *starting_folder)
 
gint(* beaver_ui_item_add )(enum BeaverMenuSection section, const gchar *name, const gchar *stock_id, const gchar *text, void(*callback)(void))
 
gint(* beaver_ui_item_submenu_add )(enum BeaverMenuSection section, const gchar *name, const gchar *text)
 
gint(* beaver_ui_item_seperator_add )(enum BeaverMenuSection section)
 
void(* beaver_ui_item_remove )(gint id, const gchar *name)
 
void(* beaver_text_insert_string )(const gchar *text)
 
BeaverTextSelection *(* beaver_text_selection_position )(void)
 
gchar *(* beaver_text_selection_get )(void)
 
void(* beaver_text_selection_set )(const gchar *text)
 
enum BeaverTextFormat(* beaver_text_format )(void)
 
void(* beaver_text_replace )(const gchar *needle, const gchar *substitute, gboolean sensitive)
 
gboolean(* beaver_text_find )(const gchar *needle, guint offset, gboolean sensitive)
 

Detailed Description

The Beaver API consists of several functions, enabling you to write plugins.

Macro Definition Documentation

◆ PLUGIN_AUTHOR

#define PLUGIN_AUTHOR (   name_string)
Value:
gchar* __plugin_author (void) \
{ \
return (name_string); \
}

Creates a function that returns a string identifying the author of this plugin.

Parameters
name_stringname of the author

◆ PLUGIN_CLEANUP

#define PLUGIN_CLEANUP (   func_handler)
Value:
void __plugin_cleanup (void) \
{ \
(func_handler) (); \
}

Creates a function that calls a function for cleanup

Parameters
func_handlerpointer to function that should be called.

◆ PLUGIN_DESCRIPTION

#define PLUGIN_DESCRIPTION (   descr_string)
Value:
gchar* __plugin_description (void) \
{ \
return (descr_string); \
}

Creates a function that returns a string identifying a short description about this plugin.

Parameters
descr_stringa short description

◆ PLUGIN_INIT

#define PLUGIN_INIT (   func_handler)
Value:
void __plugin_init (void) \
{ \
(func_handler) (); \
}

Creates a function that calls a function for initialization

Parameters
func_handlerpointer to function that should be called.

◆ PLUGIN_NAME

#define PLUGIN_NAME (   name_string)
Value:
gchar* __plugin_name (void) \
{ \
return (name_string); \
}

Creates a function that returns a string identifying the name of this plugin

Parameters
name_stringname of this plugin

◆ PLUGIN_PREFERENCE

#define PLUGIN_PREFERENCE (   func_handler)
Value:
void __plugin_preference (void) \
{ \
(func_handler) (); \
}

Creates a function that calls a function when the preferences button in the plugin manager was clicked.

Parameters
func_handlerpointer to function that should be called.

◆ PLUGIN_VERSION

#define PLUGIN_VERSION (   version_string)
Value:
gchar* __plugin_version (void) \
{ \
return (version_string); \
}

Creates a function that returns a string identifying the version of this plugin

Parameters
version_stringversion

Enumeration Type Documentation

◆ BeaverMenuSection

the different menu sections.

Parameters
BEAVER_SECTION_MENU_TOOLS
BEAVER_SECTION_MENU_VIEW
BEAVER_SECTION_MENU_EDIT
BEAVER_SECTION_TOOLBAR

◆ BeaverTextFormat

the different text formats

Parameters
BEAVER_FORMAT_UNIX
BEAVER_FORMAT_MAC
BEAVER_FORMAT_DOS

Variable Documentation

◆ beaver_box_error

void(* beaver_box_error) (gchar *message)
See also
src/api/box.c

◆ beaver_box_file_selection

gchar*(* beaver_box_file_selection) (gchar *title, GtkFileChooserAction action, const gchar *starting_folder)
See also
src/api/box.c

◆ beaver_box_message

void(* beaver_box_message) (gchar *message)
See also
src/api/box.c

◆ beaver_box_prompt

gchar*(* beaver_box_prompt) (gchar *message)
See also
src/api/box.c

◆ beaver_box_question

gint(* beaver_box_question) (gchar *message)
See also
src/api/box.c

◆ beaver_text_find

gboolean(* beaver_text_find) (const gchar *needle, guint offset, gboolean sensitive)
See also
src/api/text.c

◆ beaver_text_format

enum BeaverTextFormat(* beaver_text_format) (void)
See also
src/api/text.c

◆ beaver_text_insert_string

void(* beaver_text_insert_string) (const gchar *text)
See also
src/api/text.c

◆ beaver_text_replace

void(* beaver_text_replace) (const gchar *needle, const gchar *substitute, gboolean sensitive)
See also
src/api/text.c

◆ beaver_text_selection_get

gchar*(* beaver_text_selection_get) (void)
See also
src/api/text.c

◆ beaver_text_selection_position

BeaverTextSelection*(* beaver_text_selection_position) (void)
See also
src/api/text.c

◆ beaver_text_selection_set

void(* beaver_text_selection_set) (const gchar *text)
See also
src/api/text.c

◆ beaver_ui_item_add

gint(* beaver_ui_item_add) (enum BeaverMenuSection section, const gchar *name, const gchar *stock_id, const gchar *text, void(*callback)(void))
See also
src/api/ui.c

◆ beaver_ui_item_remove

void(* beaver_ui_item_remove) (gint id, const gchar *name)
See also
src/api/ui.c

◆ beaver_ui_item_seperator_add

gint(* beaver_ui_item_seperator_add) (enum BeaverMenuSection section)
See also
src/api/ui.c

◆ beaver_ui_item_submenu_add

gint(* beaver_ui_item_submenu_add) (enum BeaverMenuSection section, const gchar *name, const gchar *text)
See also
src/api/ui.c