Beaver  0.4.1
Functions
box.c File Reference
#include <glib.h>
#include <gtk/gtk.h>
#include "api.h"

Functions

void beaver_box_message_impl (gchar *message)
 
void beaver_box_error_impl (gchar *message)
 
gint beaver_box_question_impl (gchar *message)
 
gchar * beaver_box_prompt_impl (gchar *message)
 
gchar * beaver_box_file_selection_impl (gchar *title, GtkFileChooserAction action, const gchar *starting_folder)
 

Detailed Description

Implementation of message and error boxes for plugins.

Function Documentation

◆ beaver_box_error_impl()

void beaver_box_error_impl ( gchar *  message)

shows an error box. the error box contains of a message label and an ok button.

Parameters
messagethe message to display

◆ beaver_box_file_selection_impl()

gchar* beaver_box_file_selection_impl ( gchar *  title,
GtkFileChooserAction  action,
const gchar *  starting_folder 
)

shows a file selection box.

Parameters
titleTitle of the file selection box.
actionSet whether the dialog is an Open or Save dialog. action can be GTK_FILE_CHOOSER_ACTION_OPEN or GTK_FILE_CHOOSER_ACTION_SAVE
starting_folderThe folder where the file selection dialog will start to look.
Returns
Returns the path of the file selected. has to be freed after usage. Returns NULL if no file was selected or an error occured.

◆ beaver_box_message_impl()

void beaver_box_message_impl ( gchar *  message)

shows a message box. the message box contains of a message label and an ok button.

Parameters
messagethe message to display

◆ beaver_box_prompt_impl()

gchar* beaver_box_prompt_impl ( gchar *  message)

shows a prompt box. the prompt box asks for input.

Parameters
messagethe message to display
Return values
theinput given by the user. returns NULL if there are errors. This pointer needs to be freed.

◆ beaver_box_question_impl()

gint beaver_box_question_impl ( gchar *  message)

shows a question box. the question box contains of a message label and two buttons: yes and no.

Parameters
messagethe message to display
Return values
1yes was pressed
0otherwise