Commit 6939898a authored by Sebastian Ramacher's avatar Sebastian Ramacher

Explicitly define function visibility

parent f8b34331
......@@ -3,6 +3,7 @@
#ifndef GIRARA_CALLBACKS_H
#define GIRARA_CALLBACKS_H
#include "macros.h"
#include "types.h"
#include <gtk/gtk.h>
......@@ -37,7 +38,7 @@ typedef gboolean (*girara_callback_inputbar_activate_t)(GtkEntry* entry,
* @return FALSE An error occurred
*/
gboolean girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* event,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback when a button (typically a mouse button) has been pressed
......@@ -49,7 +50,7 @@ gboolean girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* ev
* @return false to propagate the event further.
*/
gboolean girara_callback_view_button_press_event(GtkWidget* widget,
GdkEventButton* button, girara_session_t* session);
GdkEventButton* button, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback when a button (typically a mouse button) has been released
......@@ -61,7 +62,7 @@ gboolean girara_callback_view_button_press_event(GtkWidget* widget,
* @return false to propagate the event further.
*/
gboolean girara_callback_view_button_release_event(GtkWidget* widget,
GdkEventButton* button, girara_session_t* session);
GdkEventButton* button, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback when the pointer moves over the widget
......@@ -73,7 +74,7 @@ gboolean girara_callback_view_button_release_event(GtkWidget* widget,
* @return false to propagate the event further.
*/
gboolean girara_callback_view_button_motion_notify_event(GtkWidget* widget,
GdkEventMotion* button, girara_session_t* session);
GdkEventMotion* button, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback then a scroll event is triggered by the view
......@@ -85,7 +86,7 @@ gboolean girara_callback_view_button_motion_notify_event(GtkWidget* widget,
* @return false to propagate the event further.
*/
gboolean girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* event,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback if the inputbar gets activated
......@@ -96,7 +97,7 @@ gboolean girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* ev
* @return FALSE An error occurred
*/
gboolean girara_callback_inputbar_activate(GtkEntry* entry,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback if an key in the input bar gets pressed
......@@ -108,7 +109,7 @@ gboolean girara_callback_inputbar_activate(GtkEntry* entry,
* @return FALSE An error occurred
*/
gboolean girara_callback_inputbar_key_press_event(GtkWidget* widget,
GdkEventKey* event, girara_session_t* session);
GdkEventKey* event, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback if the text of the input bar has changed
......@@ -119,6 +120,6 @@ gboolean girara_callback_inputbar_key_press_event(GtkWidget* widget,
* @return FALSE An error occurred
*/
gboolean girara_callback_inputbar_changed_event(GtkEditable* widget,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
#endif
......@@ -3,6 +3,7 @@
#ifndef GIRARA_COMMANDS_H
#define GIRARA_COMMANDS_H
#include "macros.h"
#include "types.h"
/**
......@@ -20,7 +21,7 @@
bool girara_inputbar_command_add(girara_session_t* session,
const char* command, const char* abbreviation,
girara_command_function_t function, girara_completion_function_t completion,
const char* description);
const char* description) GIRARA_VISIBLE;
/**
* Adds a special command
......@@ -37,6 +38,6 @@ bool girara_inputbar_command_add(girara_session_t* session,
*/
bool girara_special_command_add(girara_session_t* session, char identifier,
girara_inputbar_special_function_t function, bool always, int argument_n,
void* argument_data);
void* argument_data) GIRARA_VISIBLE;
#endif
......@@ -3,6 +3,7 @@
#ifndef GIRARA_COMPLETION_H
#define GIRARA_COMPLETION_H
#include "macros.h"
#include "types.h"
/**
......@@ -11,7 +12,7 @@
* @return Completion object
* @return NULL An error occurred
*/
girara_completion_t* girara_completion_init(void);
girara_completion_t* girara_completion_init(void) GIRARA_VISIBLE;
/**
* Creates an girara completion group
......@@ -20,14 +21,14 @@ girara_completion_t* girara_completion_init(void);
* @return NULL An error occurred
*/
girara_completion_group_t* girara_completion_group_create(
girara_session_t* session, const char* name);
girara_session_t* session, const char* name) GIRARA_VISIBLE;
/**
* Frees a completion group
*
* @param group The group
*/
void girara_completion_group_free(girara_completion_group_t* group);
void girara_completion_group_free(girara_completion_group_t* group) GIRARA_VISIBLE;
/**
* Adds an group to a completion object
......@@ -36,14 +37,14 @@ void girara_completion_group_free(girara_completion_group_t* group);
* @param group The completion group
*/
void girara_completion_add_group(girara_completion_t* completion,
girara_completion_group_t* group);
girara_completion_group_t* group) GIRARA_VISIBLE;
/**
* Frees an completion and all of its groups and elements
*
* @param completion The completion
*/
void girara_completion_free(girara_completion_t* completion);
void girara_completion_free(girara_completion_t* completion) GIRARA_VISIBLE;
/**
* Adds an element to a completion group
......@@ -53,6 +54,6 @@ void girara_completion_free(girara_completion_t* completion);
* @param description Description of the entry
*/
void girara_completion_group_add_element(girara_completion_group_t* group,
const char* value, const char* description);
const char* value, const char* description) GIRARA_VISIBLE;
#endif
......@@ -3,6 +3,7 @@
#ifndef GIRARA_CONFIG_H
#define GIRARA_CONFIG_H
#include "macros.h"
#include "types.h"
/**
......@@ -11,7 +12,7 @@
* @param session The used girara session
* @param path Path to the configuration file
*/
void girara_config_parse(girara_session_t* session, const char* path);
void girara_config_parse(girara_session_t* session, const char* path) GIRARA_VISIBLE;
/**
* Adds an additional config handler
......@@ -22,6 +23,6 @@ void girara_config_parse(girara_session_t* session, const char* path);
* @return true if no error occurred, otherwise false
*/
bool girara_config_handle_add(girara_session_t* session, const char* identifier,
girara_command_function_t handle);
girara_command_function_t handle) GIRARA_VISIBLE;
#endif
This diff is collapsed.
......@@ -4,6 +4,7 @@
#define GIRARA_INPUT_HISTORY_H
#include <glib-object.h>
#include "macros.h"
#include "types.h"
struct girara_input_history_io_interface_s {
......@@ -43,11 +44,11 @@ struct girara_input_history_io_interface_s {
#define GIRARA_INPUT_HISTORY_IO_GET_INTERFACE(obj) \
(G_TYPE_INSTANCE_GET_INTERFACE((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIOInterface))
GType girara_input_history_io_get_type(void) G_GNUC_CONST;
GType girara_input_history_io_get_type(void) G_GNUC_CONST GIRARA_VISIBLE;
void girara_input_history_io_append(GiraraInputHistoryIO* io, const char* input);
void girara_input_history_io_append(GiraraInputHistoryIO* io, const char* input) GIRARA_VISIBLE;
girara_list_t* girara_input_history_io_read(GiraraInputHistoryIO* io);
girara_list_t* girara_input_history_io_read(GiraraInputHistoryIO* io) GIRARA_VISIBLE;
struct girara_input_history_s {
......@@ -128,7 +129,7 @@ struct girara_input_history_class_s {
*
* @return the type
*/
GType girara_input_history_get_type(void) G_GNUC_CONST;
GType girara_input_history_get_type(void) G_GNUC_CONST GIRARA_VISIBLE;
/**
* Create new input history object.
......@@ -136,7 +137,7 @@ GType girara_input_history_get_type(void) G_GNUC_CONST;
* @param io a GiraraInputHistoryIO instance, may be NULL
* @returns an input history object
*/
GiraraInputHistory* girara_input_history_new(GiraraInputHistoryIO* io);
GiraraInputHistory* girara_input_history_new(GiraraInputHistoryIO* io) GIRARA_VISIBLE;
/**
* Append a new line of input.
......@@ -144,7 +145,7 @@ GiraraInputHistory* girara_input_history_new(GiraraInputHistoryIO* io);
* @param history an input history instance
* @param input the input
*/
void girara_input_history_append(GiraraInputHistory* history, const char* input);
void girara_input_history_append(GiraraInputHistory* history, const char* input) GIRARA_VISIBLE;
/**
* Get the "next" input from the history
......@@ -154,7 +155,7 @@ void girara_input_history_append(GiraraInputHistory* history, const char* input)
* @returns "next" input
*/
const char* girara_input_history_next(GiraraInputHistory* history,
const char* current_input);
const char* current_input) GIRARA_VISIBLE;
/**
* Get the "previous" input from the history
......@@ -164,14 +165,14 @@ const char* girara_input_history_next(GiraraInputHistory* history,
* @returns "previous" input
*/
const char* girara_input_history_previous(GiraraInputHistory* history,
const char* current_input);
const char* current_input) GIRARA_VISIBLE;
/**
* Reset state of the input history
*
* @param history an input history instance
*/
void girara_input_history_reset(GiraraInputHistory* history);
void girara_input_history_reset(GiraraInputHistory* history) GIRARA_VISIBLE;
/**
* Get a list of all the inputs stored.
......@@ -179,6 +180,6 @@ void girara_input_history_reset(GiraraInputHistory* history);
* @param history an input history instance
* @returns a list containing all inputs
*/
girara_list_t* girara_input_history_list(GiraraInputHistory* history);
girara_list_t* girara_input_history_list(GiraraInputHistory* history) GIRARA_VISIBLE;
#endif
......@@ -49,7 +49,7 @@ typedef enum girara_log_level_e
* @param format printf like format string
*/
void girara_log(const char* location, const char* function, girara_log_level_t level,
const char* format, ...) GIRARA_PRINTF(4, 5);
const char* format, ...) GIRARA_PRINTF(4, 5) GIRARA_VISIBLE;
/**
* Print a message.
......@@ -61,19 +61,19 @@ void girara_log(const char* location, const char* function, girara_log_level_t l
* @param ap varag list
*/
void girara_vlog(const char* location, const char* function, girara_log_level_t level,
const char* format, va_list ap);
const char* format, va_list ap) GIRARA_VISIBLE;
/**
* Get the log level.
* @returns The log level.
*/
girara_log_level_t girara_get_log_level(void);
girara_log_level_t girara_get_log_level(void) GIRARA_VISIBLE;
/**
* Set the log level. Any message with a level lower than the log level will
* be discarded.
* @param level The new log level.
*/
void girara_set_log_level(girara_log_level_t level);
void girara_set_log_level(girara_log_level_t level) GIRARA_VISIBLE;
#endif
......@@ -27,7 +27,7 @@
#endif
#ifndef GIRARA_HIDDEN
# if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__)
# if (defined(__GNUC__) && (__GNUC__ >= 4)) || __has_attribute(visibility)
# define GIRARA_HIDDEN __attribute__((visibility("hidden")))
# elif defined(__SUNPRO_C)
# define GIRARA_HIDDEN __hidden
......@@ -37,7 +37,7 @@
#endif
#ifndef GIRARA_VISIBLE
# if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__)
# if (defined(__GNUC__) && (__GNUC__ >= 4)) || __has_attribute(visibility)
# define GIRARA_VISIBLE __attribute__((visibility("default")))
# else
# define GIRARA_VISIBLE
......
......@@ -91,7 +91,7 @@ struct girara_session_s
* @return A valid session object
* @return NULL when an error occurred
*/
girara_session_t* girara_session_create(void);
girara_session_t* girara_session_create(void) GIRARA_VISIBLE;
/**
* Initializes an girara session
......@@ -101,7 +101,7 @@ girara_session_t* girara_session_create(void);
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_session_init(girara_session_t* session, const char* appname);
bool girara_session_init(girara_session_t* session, const char* appname) GIRARA_VISIBLE;
/**
* Destroys an girara session
......@@ -110,7 +110,7 @@ bool girara_session_init(girara_session_t* session, const char* appname);
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_session_destroy(girara_session_t* session);
bool girara_session_destroy(girara_session_t* session) GIRARA_VISIBLE;
/**
* Sets the view widget of girara
......@@ -120,7 +120,7 @@ bool girara_session_destroy(girara_session_t* session);
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_set_view(girara_session_t* session, GtkWidget* widget);
bool girara_set_view(girara_session_t* session, GtkWidget* widget) GIRARA_VISIBLE;
/**
* Returns a copy of the buffer
......@@ -128,7 +128,7 @@ bool girara_set_view(girara_session_t* session, GtkWidget* widget);
* @param session The used girara session
* @return Copy of the current buffer
*/
char* girara_buffer_get(girara_session_t* session);
char* girara_buffer_get(girara_session_t* session) GIRARA_VISIBLE;
/**
* Displays a notification popup for the user using libnotify. Basic styling
......@@ -140,7 +140,7 @@ char* girara_buffer_get(girara_session_t* session);
* @param body The content
*/
void girara_libnotify(girara_session_t* session, const char *summary,
const char *body);
const char *body) GIRARA_VISIBLE;
/**
* Displays a notification for the user. It is possible to pass GIRARA_INFO,
......@@ -152,7 +152,7 @@ void girara_libnotify(girara_session_t* session, const char *summary,
* @param ...
*/
void girara_notify(girara_session_t* session, int level,
const char* format, ...) GIRARA_PRINTF(3, 4);
const char* format, ...) GIRARA_PRINTF(3, 4) GIRARA_VISIBLE;
/**
* Creates a girara dialog
......@@ -166,7 +166,7 @@ void girara_notify(girara_session_t* session, int level,
*/
void girara_dialog(girara_session_t* session, const char* dialog, bool
invisible, girara_callback_inputbar_key_press_event_t key_press_event,
girara_callback_inputbar_activate_t activate_event, void* data);
girara_callback_inputbar_activate_t activate_event, void* data) GIRARA_VISIBLE;
/**
* Adds a new mode by its string identifier
......@@ -175,7 +175,7 @@ void girara_dialog(girara_session_t* session, const char* dialog, bool
* @param name The string identifier used in configs/inputbar etc to refer by
* @return A newly defined girara_mode_t associated with name
*/
girara_mode_t girara_mode_add(girara_session_t* session, const char* name);
girara_mode_t girara_mode_add(girara_session_t* session, const char* name) GIRARA_VISIBLE;
/**
* Sets the current mode
......@@ -183,7 +183,7 @@ girara_mode_t girara_mode_add(girara_session_t* session, const char* name);
* @param session The used girara session
* @param mode The new mode
*/
void girara_mode_set(girara_session_t* session, girara_mode_t mode);
void girara_mode_set(girara_session_t* session, girara_mode_t mode) GIRARA_VISIBLE;
/**
* Returns the current mode
......@@ -191,7 +191,7 @@ void girara_mode_set(girara_session_t* session, girara_mode_t mode);
* @param session The used girara session
* @return The current mode
*/
girara_mode_t girara_mode_get(girara_session_t* session);
girara_mode_t girara_mode_get(girara_session_t* session) GIRARA_VISIBLE;
/**
* Set name of the window title
......@@ -201,7 +201,7 @@ girara_mode_t girara_mode_get(girara_session_t* session);
* @return true if no error occurred
* @return false if an error occurred
*/
bool girara_set_window_title(girara_session_t* session, const char* name);
bool girara_set_window_title(girara_session_t* session, const char* name) GIRARA_VISIBLE;
/**
* Set icon of the window
......@@ -211,7 +211,7 @@ bool girara_set_window_title(girara_session_t* session, const char* name);
* @return true if no error occurred
* @return false if an error occurred
*/
bool girara_set_window_icon(girara_session_t* session, const char* name);
bool girara_set_window_icon(girara_session_t* session, const char* name) GIRARA_VISIBLE;
/**
* Returns the command history
......@@ -219,7 +219,7 @@ bool girara_set_window_icon(girara_session_t* session, const char* name);
* @param session The used girara session
* @return The command history (list of strings) or NULL
*/
girara_list_t* girara_get_command_history(girara_session_t* session);
girara_list_t* girara_get_command_history(girara_session_t* session) GIRARA_VISIBLE;
/**
* Returns the internal template object to apply custom theming options
......@@ -227,7 +227,7 @@ girara_list_t* girara_get_command_history(girara_session_t* session);
* @param session The girara session
* @returns GiraraTemplate object
*/
GiraraTemplate* girara_session_get_template(girara_session_t* session);
GiraraTemplate* girara_session_get_template(girara_session_t* session) GIRARA_VISIBLE;
/**
* Replaces the internal template object, thus provides entirely user-defined styling.
......@@ -240,6 +240,6 @@ GiraraTemplate* girara_session_get_template(girara_session_t* session);
* @note Using the template @c girara_template_new("") will use the default gtk style
*
*/
void girara_session_set_template(girara_session_t* session, GiraraTemplate* template, bool init_variables);
void girara_session_set_template(girara_session_t* session, GiraraTemplate* template, bool init_variables) GIRARA_VISIBLE;
#endif
......@@ -4,6 +4,7 @@
#define GIRARA_SETTINGS_H
#include "types.h"
#include "macros.h"
/**
* Adds an additional entry in the settings list
......@@ -21,7 +22,7 @@
*/
bool girara_setting_add(girara_session_t* session, const char* name,
void* value, girara_setting_type_t type, bool init_only,
const char* description, girara_setting_callback_t callback, void* data);
const char* description, girara_setting_callback_t callback, void* data) GIRARA_VISIBLE;
/**
* Sets the value of a setting
......@@ -32,7 +33,7 @@ bool girara_setting_add(girara_session_t* session, const char* name,
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_setting_set(girara_session_t* session, const char* name, void* value);
bool girara_setting_set(girara_session_t* session, const char* name, void* value) GIRARA_VISIBLE;
/**
* Retrieve the value of a setting. If the setting is a string, the value stored
......@@ -42,7 +43,7 @@ bool girara_setting_set(girara_session_t* session, const char* name, void* value
* @param dest A pointer to the destination of the result.
* @return true if the setting exists, false otherwise.
*/
bool girara_setting_get(girara_session_t* session, const char* name, void* dest);
bool girara_setting_get(girara_session_t* session, const char* name, void* dest) GIRARA_VISIBLE;
/**
* Find a setting.
......@@ -51,7 +52,7 @@ bool girara_setting_get(girara_session_t* session, const char* name, void* dest)
* @param name name of the setting
* @return the setting or NULL if it doesn't exist
*/
girara_setting_t* girara_setting_find(girara_session_t* session, const char* name);
girara_setting_t* girara_setting_find(girara_session_t* session, const char* name) GIRARA_VISIBLE;
/**
* Get the setting's name.
......@@ -59,7 +60,7 @@ girara_setting_t* girara_setting_find(girara_session_t* session, const char* nam
* @param setting The setting
* @return the setting's name
*/
const char* girara_setting_get_name(girara_setting_t* setting);
const char* girara_setting_get_name(girara_setting_t* setting) GIRARA_VISIBLE;
/**
* Get the setting's value. If the setting is a string, the value stored
......@@ -69,7 +70,7 @@ const char* girara_setting_get_name(girara_setting_t* setting);
* @param dest A pointer to the destination of the result.
* @return true if the setting exists, false otherwise.
*/
bool girara_setting_get_value(girara_setting_t* setting, void* dest);
bool girara_setting_get_value(girara_setting_t* setting, void* dest) GIRARA_VISIBLE;
/**
* Get the setting's value.
......@@ -77,7 +78,7 @@ bool girara_setting_get_value(girara_setting_t* setting, void* dest);
* @param setting The setting
* @return the value
*/
girara_setting_type_t girara_setting_get_type(girara_setting_t* setting);
girara_setting_type_t girara_setting_get_type(girara_setting_t* setting) GIRARA_VISIBLE;
/**
* Set the setting's value. If session is NULL, the setting's callback won't be
......@@ -88,6 +89,6 @@ girara_setting_type_t girara_setting_get_type(girara_setting_t* setting);
* @param value The new value
*/
void girara_setting_set_value(girara_session_t* session,
girara_setting_t* setting, void* value);
girara_setting_t* setting, void* value) GIRARA_VISIBLE;
#endif
......@@ -4,6 +4,7 @@
#define GIRARA_SHORTCUTS_H
#include "types.h"
#include "macros.h"
#include <glib.h>
/**
......@@ -24,7 +25,7 @@
*/
bool girara_shortcut_add(girara_session_t* session, guint modifier, guint key,
const char* buffer, girara_shortcut_function_t function, girara_mode_t mode,
int argument_n, void* argument_data);
int argument_n, void* argument_data) GIRARA_VISIBLE;
/**
* Removes a shortcut
......@@ -38,7 +39,7 @@ bool girara_shortcut_add(girara_session_t* session, guint modifier, guint key,
* @return false An error occurred
*/
bool girara_shortcut_remove(girara_session_t* session, guint modifier, guint
key, const char* buffer, girara_mode_t mode);
key, const char* buffer, girara_mode_t mode) GIRARA_VISIBLE;
/**
* Adds an inputbar shortcut
......@@ -54,7 +55,7 @@ bool girara_shortcut_remove(girara_session_t* session, guint modifier, guint
*/
bool girara_inputbar_shortcut_add(girara_session_t* session, guint modifier,
guint key, girara_shortcut_function_t function, int argument_n, void*
argument_data);
argument_data) GIRARA_VISIBLE;
/**
* Removes an inputbar shortcut
......@@ -66,7 +67,7 @@ bool girara_inputbar_shortcut_add(girara_session_t* session, guint modifier,
* @return false An error occurred
*/
bool girara_inputbar_shortcut_remove(girara_session_t* session, guint modifier,
guint key);
guint key) GIRARA_VISIBLE;
/**
* Default shortcut function to focus the inputbar
......@@ -79,7 +80,7 @@ bool girara_inputbar_shortcut_remove(girara_session_t* session, guint modifier,
* @return false An error occurred (abort execution)
*/
bool girara_sc_focus_inputbar(girara_session_t* session, girara_argument_t*
argument, girara_event_t* event, unsigned int t);
argument, girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default shortcut function to abort
......@@ -92,7 +93,7 @@ bool girara_sc_focus_inputbar(girara_session_t* session, girara_argument_t*
* @return false An error occurred (abort execution)
*/
bool girara_sc_abort(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default shortcut function to quit the application
......@@ -105,7 +106,7 @@ bool girara_sc_abort(girara_session_t* session, girara_argument_t* argument,
* @return false An error occurred (abort execution)
*/
bool girara_sc_quit(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Toggles the visibility of the inputbar
......@@ -118,7 +119,7 @@ bool girara_sc_quit(girara_session_t* session, girara_argument_t* argument,
* @return false An error occurred (abort execution)
*/
bool girara_sc_toggle_inputbar(girara_session_t* session, girara_argument_t*
argument, girara_event_t* event, unsigned int t);
argument, girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Toggles the visibility of the statusbar
......@@ -131,7 +132,7 @@ bool girara_sc_toggle_inputbar(girara_session_t* session, girara_argument_t*
* @return false An error occurred (abort execution)
*/
bool girara_sc_toggle_statusbar(girara_session_t* session, girara_argument_t*
argument, girara_event_t* event, unsigned int t);
argument, girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Passes the argument to the set command
......@@ -144,7 +145,7 @@ bool girara_sc_toggle_statusbar(girara_session_t* session, girara_argument_t*
* @return false An error occurred (abort execution)
*/
bool girara_sc_set(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Executes a command.
......@@ -157,7 +158,7 @@ bool girara_sc_set(girara_session_t* session, girara_argument_t* argument,
* @return false An error occurred (abort execution)
*/
bool girara_sc_exec(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default shortcut function to activate
......@@ -170,7 +171,7 @@ bool girara_sc_exec(girara_session_t* session, girara_argument_t* argument,
* @return false An error occurred (abort execution)
*/
bool girara_isc_activate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default inputbar shortcut to abort
......@@ -183,7 +184,7 @@ bool girara_isc_activate(girara_session_t* session, girara_argument_t* argument,
* @return false An error occurred (abort execution)
*/
bool girara_isc_abort(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default inputbar shortcut that completes the given input
......@@ -197,7 +198,7 @@ bool girara_isc_abort(girara_session_t* session, girara_argument_t* argument,
* @return false An error occurred (abort execution)
*/
bool girara_isc_completion(girara_session_t* session, girara_argument_t*
argument, girara_event_t* event, unsigned int t);
argument, girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default inputbar shortcut to manipulate the inputbar string
......@@ -210,7 +211,7 @@ bool girara_isc_completion(girara_session_t* session, girara_argument_t*
* @return false An error occurred (abort execution)
*/
bool girara_isc_string_manipulation(girara_session_t* session,
girara_argument_t* argument, girara_event_t* event, unsigned int t);
girara_argument_t* argument, girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Default inputbar shortcut to navigate through the command history
......@@ -223,7 +224,7 @@ bool girara_isc_string_manipulation(girara_session_t* session,
* @return false An error occurred (abort execution)
*/
bool girara_isc_command_history(girara_session_t* session,
girara_argument_t* argument, girara_event_t* event, unsigned int t);
girara_argument_t* argument, girara_event_t* event, unsigned int t) GIRARA_VISIBLE;
/**
* Creates a mapping between a shortcut function and an identifier and is used
......@@ -235,7 +236,7 @@ bool girara_isc_command_history(girara_session_t* session,
* @return true if no error occurred
*/
bool girara_shortcut_mapping_add(girara_session_t* session,
const char* identifier, girara_shortcut_function_t function);
const char* identifier, girara_shortcut_function_t function) GIRARA_VISIBLE;
/**
* Creates a mapping between a shortcut argument and an identifier and is used
......@@ -247,7 +248,7 @@ bool girara_shortcut_mapping_add(girara_session_t* session,
* @return true if no error occurred
*/
bool girara_argument_mapping_add(girara_session_t* session,
const char* identifier, int value);
const char* identifier, int value) GIRARA_VISIBLE;
/**
* Adds a mouse event
......@@ -265,7 +266,7 @@ bool girara_argument_mapping_add(girara_session_t* session,
*/
bool girara_mouse_event_add(girara_session_t* session, guint mask, guint button,
girara_shortcut_function_t function, girara_mode_t mode,
girara_event_type_t event_type, int argument_n, void* argument_data);
girara_event_type_t event_type, int argument_n, void* argument_data) GIRARA_VISIBLE;
/**
* Removes a mouse event
......@@ -278,6 +279,6 @@ bool girara_mouse_event_add(girara_session_t* session, guint mask, guint button,
* @return false An error occurred
*/
bool girara_mouse_event_remove(girara_session_t* session, guint mask,
guint button, girara_mode_t mode);
guint button, girara_mode_t mode) GIRARA_VISIBLE;
#endif
......@@ -31,7 +31,7 @@ typedef bool (*girara_statusbar_event_t)(GtkWidget* widget, GdkEvent* event,
* @return NULL An error occurred
*/
girara_statusbar_item_t* girara_statusbar_item_add(girara_session_t* session,
bool expand, bool fill, bool left, girara_statusbar_event_t callback);
bool expand, bool fill, bool left, girara_statusbar_event_t callback) GIRARA_VISIBLE;
/**
* Sets the shown text of an statusbar item
......@@ -43,6 +43,6 @@ girara_statusbar_item_t* girara_statusbar_item_add(girara_session_t* session,
* @return FALSE An error occurred
*/
bool girara_statusbar_item_set_text(girara_session_t* session,
girara_statusbar_item_t* item, const char* text);
girara_statusbar_item_t* item, const char* text) GIRARA_VISIBLE;
#endif
......@@ -4,6 +4,7 @@
#define GIRARA_TEMPLATE_H
#include <glib-object.h>
#include "macros.h"
#include "types.h"
struct girara_template_s {
......@@ -36,7 +37,7 @@ struct girara_template_class_s {
*
* @return the type
*/
GType girara_template_get_type(void) G_GNUC_CONST;
GType girara_template_get_type(void) G_GNUC_CONST GIRARA_VISIBLE;
/**
* Create new template object.
......@@ -44,7 +45,7 @@ GType girara_template_get_type(void) G_GNUC_CONST;
* @param base a string that is used as template
* @returns a templot object
*/
GiraraTemplate* girara_template_new(const char* base);
GiraraTemplate* girara_template_new(const char* base) GIRARA_VISIBLE;
/**
* Set the base string of the template.
......@@ -52,7 +53,7 @@ GiraraTemplate* girara_template_new(const char* base);
* @param object GiraraTemplate object
* @param base a string that is used as template
*/
void girara_template_set_base(GiraraTemplate* object, const char* base);
void girara_template_set_base(GiraraTemplate* object, const char* base) GIRARA_VISIBLE;
/**
* Get the base string of the template.
......@@ -60,7 +61,7 @@ void girara_template_set_base(GiraraTemplate* object, const char* base);
* @param object GiraraTemplate object
* @returns string that is used as template
*/
const char* girara_template_get_base(GiraraTemplate* object);
const char* girara_template_get_base(GiraraTemplate* object) GIRARA_VISIBLE;
/**
* Get list of variable names referenced in the template.
......@@ -68,7 +69,7 @@ const char* girara_template_get_base(GiraraTemplate* object);
* @param object GiraraTemplate object
* @returns list of variables names referenced in the template
*/
girara_list_t* girara_template_referenced_variables(GiraraTemplate* object);
girara_list_t* girara_template_referenced_variables(GiraraTemplate* object) GIRARA_VISIBLE;