src/api/box.c File Reference
#include <glib.h>
#include <gtk/gtk.h>
#include "api.h"
#include "beaver.h"
Detailed Description
Implementation of message and error boxes for plugins.
Function Documentation
void beaver_box_error_impl |
( |
gchar * |
message |
) |
|
shows an error box. the error box contains of a message label and an ok button.
- Parameters:
-
| message | the message to display |
gchar* beaver_box_file_selection_impl |
( |
gchar * |
title, |
|
|
GtkFileChooserAction |
action, |
|
|
const gchar * |
starting_folder | |
|
) |
| | |
shows a file selection box.
- Parameters:
-
| title | Title of the file selection box. |
| action | Set whether the dialog is an Open or Save dialog. action can be GTK_FILE_CHOOSER_ACTION_OPEN or GTK_FILE_CHOOSER_ACTION_SAVE |
| starting_folder | The 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.
void beaver_box_message_impl |
( |
gchar * |
message |
) |
|
shows a message box. the message box contains of a message label and an ok button.
- Parameters:
-
| message | the message to display |
gchar* beaver_box_prompt_impl |
( |
gchar * |
message |
) |
|
shows a prompt box. the prompt box asks for input.
- Parameters:
-
| message | the message to display |
- Return values:
-
| the | input given by the user. returns NULL if there are errors. This pointer needs to be freed. |
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:
-
| message | the message to display |
- Return values:
-
| 1 | yes was pressed |
| 0 | otherwise |