Commit 07e88ec5 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge branch 'release/0.3.2'

parents e1d94030 a7891a45
Pipeline #166 failed with stages
Copyright (c) 2010-2017 pwmt.org
Copyright (c) 2010-2018 pwmt.org
This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use of
......
......@@ -11,7 +11,7 @@ enhance the user interface that is used by zathura.
Requirements
------------
meson (>= 0.43)
meson (>= 0.47)
glib (>= 2.50)
gtk3 (>= 3.20)
intltool
......@@ -19,7 +19,7 @@ libnotify (optional, for notification support)
json-c (optional, for configuration dumping support)
To disable the optional support for libnotify and json-c, configure the build
system with -Denable-notify=false or -Denable-json=false.
system with -Dnotify=disabled or -Djson=disabled.
Installation
------------
......@@ -38,5 +38,4 @@ refer to the meson documentation for platform specific dependencies.
Bugs
----
Please report bugs at http://bugs.pwmt.org or contact us on our mailing list at
girara@lists.pwmt.org.
Please report bugs at https://git.pwmt.org/pwmt/girara.
# See LICENSE file for license and copyright information
# SPDX-License-Identifier: Zlib
# General information
PROJECT_NAME = girara
......
doxygen = find_program('doxygen', required: false)
if get_option('enable-docs') and doxygen.found()
doxygen = find_program('doxygen', required: get_option('docs'))
if doxygen.found()
conf_data = configuration_data()
conf_data.set('DOXYGEN_INPUT', meson.source_root())
conf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir())
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "callbacks.h"
......@@ -162,7 +162,7 @@ girara_callback_view_key_press_event(GtkWidget* widget,
/* buffer could match a command */
if (!strncmp(session_private->buffer.command->str, shortcut->buffered_command, session_private->buffer.command->len)) {
/* command matches buffer exactly */
if (!strcmp(session_private->buffer.command->str, shortcut->buffered_command)
if (!g_strcmp0(session_private->buffer.command->str, shortcut->buffered_command)
&& (session->modes.current_mode == shortcut->mode || shortcut->mode == 0)) {
g_string_free(session_private->buffer.command, TRUE);
g_string_free(session->global.buffer, TRUE);
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#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
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "commands.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#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
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <math.h>
#include <string.h>
......@@ -199,8 +199,8 @@ girara_isc_completion(girara_session_t* session, girara_argument_t* argument, gi
* there is only one completion entry
*/
if ( (argument->n == GIRARA_HIDE) ||
(current_parameter && previous_parameter && strcmp(current_parameter, previous_parameter)) ||
(current_command && previous_command && strcmp(current_command, previous_command)) ||
(current_parameter && previous_parameter && g_strcmp0(current_parameter, previous_parameter)) ||
(current_command && previous_command && g_strcmp0(current_command, previous_command)) ||
(input_length != previous_length) ||
is_single_entry
)
......@@ -434,8 +434,8 @@ girara_isc_completion(girara_session_t* session, girara_argument_t* argument, gi
/* hide other items */
unsigned int n_completion_items = 15;
girara_setting_get(session, "n-completion-items", &n_completion_items);
unsigned int uh = ceil( n_completion_items / 2);
unsigned int lh = floor(n_completion_items / 2);
unsigned int uh = ceil(n_completion_items / 2.0);
unsigned int lh = floor(n_completion_items / 2.0);
unsigned int current_item = g_list_position(entries, entries_current);
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#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
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "config.h"
......@@ -126,11 +126,11 @@ cb_scrollbars(girara_session_t* session, const char* name,
bool show_hscrollbar = strchr(guioptions, 'h') != NULL;
bool show_vscrollbar = strchr(guioptions, 'v') != NULL;
if (strcmp(name, "show-scrollbars") == 0) {
if (g_strcmp0(name, "show-scrollbars") == 0) {
show_hscrollbar = show_vscrollbar = val;
} else if (strcmp(name, "show-h-scrollbar") == 0) {
} else if (g_strcmp0(name, "show-h-scrollbar") == 0) {
show_hscrollbar = val;
} else if (strcmp(name, "show-v-scrollbar") == 0) {
} else if (g_strcmp0(name, "show-v-scrollbar") == 0) {
show_vscrollbar = val;
}
......@@ -209,8 +209,8 @@ girara_config_load_default(girara_session_t* session)
girara_setting_add(session, "word-separator", " /.-=&#?", STRING, TRUE, NULL, NULL, NULL);
girara_setting_add(session, "window-width", &window_width, INT, TRUE, _("Initial window width"), NULL, NULL);
girara_setting_add(session, "window-height", &window_height, INT, TRUE, _("Initial window height"), NULL, NULL);
girara_setting_add(session, "statusbar-h-padding", &statusbar_h_padding, INT, TRUE, _("Horizontal padding for the status input and notification bars"), NULL, NULL);
girara_setting_add(session, "statusbar-v-padding", &statusbar_v_padding, INT, TRUE, _("Vertical padding for the status input and notification bars"), NULL, NULL);
girara_setting_add(session, "statusbar-h-padding", &statusbar_h_padding, INT, TRUE, _("Horizontal padding for the status, input, and notification bars"), NULL, NULL);
girara_setting_add(session, "statusbar-v-padding", &statusbar_v_padding, INT, TRUE, _("Vertical padding for the status, input, and notification bars"), NULL, NULL);
girara_setting_add(session, "n-completion-items", &n_completion_items, INT, TRUE, _("Number of completion items"), NULL, NULL);
girara_setting_add(session, "show-scrollbars", &show_scrollbars, BOOLEAN, FALSE, _("Show both the horizontal and vertical scrollbars"), cb_scrollbars, NULL);
girara_setting_add(session, "show-h-scrollbar", &show_scrollbars, BOOLEAN, FALSE, _("Show the horizontal scrollbar"), cb_scrollbars, NULL);
......@@ -289,7 +289,7 @@ girara_config_handle_add(girara_session_t* session, const char* identifier, gira
/* search for existing config handle */
GIRARA_LIST_FOREACH_BODY(session_private->config.handles, girara_config_handle_t*, data,
if (strcmp(data->identifier, identifier) == 0) {
if (g_strcmp0(data->identifier, identifier) == 0) {
data->handle = handle;
found = true;
break;
......@@ -364,7 +364,7 @@ config_parse(girara_session_t* session, const char* path)
}
/* include gets a special treatment */
if (strcmp(argv[0], "include") == 0) {
if (g_strcmp0(argv[0], "include") == 0) {
if (argc != 2) {
girara_warning("Could not process line %d in '%s': usage: include path.", line_number, path);
} else {
......@@ -379,7 +379,7 @@ config_parse(girara_session_t* session, const char* path)
g_free(basename);
}
if (strcmp(newpath, path) == 0) {
if (g_strcmp0(newpath, path) == 0) {
girara_warning("Could not process line %d in '%s': trying to include itself.", line_number, path);
} else {
girara_debug("Loading config file '%s'.", newpath);
......@@ -395,7 +395,7 @@ config_parse(girara_session_t* session, const char* path)
girara_config_handle_t* handle = NULL;
GIRARA_LIST_FOREACH_BODY(session_private->config.handles, girara_config_handle_t*, tmp,
handle = tmp;
if (strcmp(handle->identifier, argv[0]) == 0) {
if (g_strcmp0(handle->identifier, argv[0]) == 0) {
handle->handle(session, argument_list);
break;
} else {
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#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
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <stdlib.h>
#include <glib.h>
......@@ -40,7 +40,7 @@ girara_list_new(void)
girara_list_t*
girara_list_new2(girara_free_function_t gfree)
{
girara_list_t* list = g_try_malloc0(sizeof(girara_list_t));
girara_list_t* list = g_slice_new0(girara_list_t);
if (list == NULL) {
return NULL;
}
......@@ -103,7 +103,7 @@ girara_list_free(girara_list_t* list)
}
girara_list_clear(list);
g_free(list);
g_slice_free(girara_list_t, list);
}
void
......@@ -203,7 +203,7 @@ girara_list_iterator(girara_list_t* list)
return NULL;
}
girara_list_iterator_t* iter = g_try_malloc0(sizeof(girara_list_iterator_t));
girara_list_iterator_t* iter = g_slice_new0(girara_list_iterator_t);
if (iter == NULL) {
return NULL;
}
......@@ -219,14 +219,7 @@ girara_list_iterator_copy(girara_list_iterator_t* iter)
{
g_return_val_if_fail(iter != NULL, NULL);
girara_list_iterator_t* iter2 = g_try_malloc0(sizeof(girara_list_iterator_t));
if (iter2 == NULL) {
return NULL;
}
iter2->list = iter->list;
iter2->element = iter->element;
return iter2;
return g_slice_copy(sizeof(girara_list_iterator_t), iter);
}
girara_list_iterator_t*
......@@ -328,7 +321,7 @@ girara_list_iterator_free(girara_list_iterator_t* iter)
return;
}
g_free(iter);
g_slice_free(girara_list_iterator_t, iter);
}
size_t
......
This diff is collapsed.
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_H
#define GIRARA_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "input-history.h"
#include "macros.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "input-history.h"
#include "datastructures.h"
#include "internal.h"
/**
* Private data of the input history
......@@ -161,7 +162,7 @@ ih_append(GiraraInputHistory* history, const char* input)
}
void* data = NULL;
while ((data = girara_list_find(list, (girara_compare_function_t) g_strcmp0, data)) != NULL) {
while ((data = girara_list_find(list, list_strcmp, data)) != NULL) {
girara_list_remove(list, data);
}
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_INPUT_HISTORY_H
#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
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_INTERNAL_H
#define GIRARA_INTERNAL_H
......@@ -150,6 +150,8 @@ HIDDEN bool girara_sc_feedkeys(girara_session_t* session, girara_argument_t* arg
HIDDEN void css_template_fill_font(GiraraTemplate* csstemplate, const char* font);
HIDDEN int list_strcmp(const void* data1, const void* data2);
/**
* Structure of a command
*/
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "log.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_LOG_H
#define GIRARA_LOG_H
......@@ -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
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_MACROS_H
#define GIRARA_MACROS_H
......@@ -7,6 +7,10 @@
#define __has_attribute(x) 0
#endif
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif
#ifndef GIRARA_PRINTF
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) || defined(__clang__)
# define GIRARA_PRINTF(format_idx, arg_idx) \
......@@ -27,7 +31,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 +41,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
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "session.h"
......@@ -25,8 +25,11 @@
static int
cb_sort_settings(girara_setting_t* lhs, girara_setting_t* rhs)
cb_sort_settings(const void* data1, const void* data2)
{
const girara_setting_t* lhs = data1;
const girara_setting_t* rhs = data2;
return g_strcmp0(girara_setting_get_name(lhs), girara_setting_get_name(rhs));
}
......@@ -314,7 +317,7 @@ girara_session_create(void)
/* settings */
session_private->settings = girara_sorted_list_new2(
(girara_compare_function_t) cb_sort_settings,
cb_sort_settings,
(girara_free_function_t) girara_setting_free);
/* CSS style provider */
......@@ -475,6 +478,7 @@ girara_session_init(girara_session_t* session, const char* sessionname)
widget_add_class(GTK_WIDGET(session->gtk.inputbar_entry), "bottom_box");
widget_add_class(session->gtk.notification_text, "bottom_box");
widget_add_class(GTK_WIDGET(session->gtk.statusbar_entries), "bottom_box");
session->signals.inputbar_key_pressed = g_signal_connect(
G_OBJECT(session->gtk.inputbar_entry),
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_SESSION_H
#define GIRARA_SESSION_H
......@@ -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);