zathura
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Enumerations | Functions
callbacks.c File Reference
#include <girara/statusbar.h>
#include <girara/session.h>
#include <girara/settings.h>
#include <girara/utils.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <string.h>
#include <glib/gi18n.h>
#include <math.h>
#include "callbacks.h"
#include "links.h"
#include "zathura.h"
#include "render.h"
#include "document.h"
#include "utils.h"
#include "shortcuts.h"
#include "page-widget.h"
#include "page.h"
#include "adjustment.h"

Go to the source code of this file.

Enumerations

enum  zathura_link_action_t { ZATHURA_LINK_ACTION_FOLLOW, ZATHURA_LINK_ACTION_DISPLAY }

Functions

gboolean cb_destroy (GtkWidget *UNUSED(widget), zathura_t *zathura)
void cb_buffer_changed (girara_session_t *session)
void cb_view_hadjustment_value_changed (GtkAdjustment *adjustment, gpointer data)
void cb_view_vadjustment_value_changed (GtkAdjustment *adjustment, gpointer data)
void cb_view_hadjustment_changed (GtkAdjustment *adjustment, gpointer data)
void cb_view_vadjustment_changed (GtkAdjustment *adjustment, gpointer data)
void cb_refresh_view (GtkWidget *GIRARA_UNUSED(view), gpointer data)
void cb_page_layout_value_changed (girara_session_t *session, const char *UNUSED(name), girara_setting_type_t UNUSED(type), void *value, void *UNUSED(data))
void cb_index_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *UNUSED(column), void *data)
bool cb_sc_follow (GtkEntry *entry, girara_session_t *session)
bool cb_sc_display_link (GtkEntry *entry, girara_session_t *session)
void cb_file_monitor (GFileMonitor *monitor, GFile *file, GFile *UNUSED(other_file), GFileMonitorEvent event, girara_session_t *session)
bool cb_password_dialog (GtkEntry *entry, zathura_password_dialog_info_t *dialog)
bool cb_view_resized (GtkWidget *UNUSED(widget), GtkAllocation *UNUSED(allocation), zathura_t *zathura)
void cb_setting_recolor_change (girara_session_t *session, const char *name, girara_setting_type_t UNUSED(type), void *value, void *UNUSED(data))
void cb_setting_recolor_keep_hue_change (girara_session_t *session, const char *name, girara_setting_type_t UNUSED(type), void *value, void *UNUSED(data))
bool cb_unknown_command (girara_session_t *session, const char *input)
void cb_page_widget_text_selected (ZathuraPage *page, const char *text, void *data)
void cb_page_widget_image_selected (ZathuraPage *page, GdkPixbuf *pixbuf, void *data)

Enumeration Type Documentation

Enumerator:
ZATHURA_LINK_ACTION_FOLLOW 
ZATHURA_LINK_ACTION_DISPLAY 

Definition at line 277 of file callbacks.c.

Function Documentation

void cb_buffer_changed ( girara_session_t *  session)

This function gets called when the buffer of girara changes

Parameters
sessionThe girara session

Definition at line 36 of file callbacks.c.

gboolean cb_destroy ( GtkWidget *  UNUSEDwidget,
zathura_t *  zathura 
)

Definition at line 25 of file callbacks.c.

void cb_file_monitor ( GFileMonitor *  monitor,
GFile *  file,
GFile *  UNUSEDother_file,
GFileMonitorEvent  event,
girara_session_t *  session 
)

Definition at line 366 of file callbacks.c.

void cb_index_row_activated ( GtkTreeView *  tree_view,
GtkTreePath *  path,
GtkTreeViewColumn *  UNUSEDcolumn,
void *  data 
)

Definition at line 249 of file callbacks.c.

void cb_page_layout_value_changed ( girara_session_t *  session,
const char *  UNUSEDname,
girara_setting_type_t   UNUSEDtype,
void *  value,
void *  UNUSEDdata 
)

Definition at line 223 of file callbacks.c.

void cb_page_widget_image_selected ( ZathuraPage *  page,
GdkPixbuf *  pixbuf,
void *  data 
)

Definition at line 567 of file callbacks.c.

void cb_page_widget_text_selected ( ZathuraPage *  page,
const char *  text,
void *  data 
)

Emitted when text has been selected in the page widget

Parameters
widgetpage view widget
textselected text
datauser data

Definition at line 536 of file callbacks.c.

bool cb_password_dialog ( GtkEntry *  entry,
zathura_password_dialog_info_t dialog 
)

Callback to read new password for file that should be opened

Parameters
entryThe password entry
dialogThe dialog information
Returns
true if input has been handled

Definition at line 402 of file callbacks.c.

void cb_refresh_view ( GtkWidget *  GIRARA_UNUSEDview,
gpointer  data 
)

Definition at line 197 of file callbacks.c.

bool cb_sc_display_link ( GtkEntry *  entry,
girara_session_t *  session 
)

Called when input has been passed to the sc_display_link dialog

Parameters
entryThe dialog inputbar
sessionThe girara session
Returns
true if no error occured and the event has been handled

Definition at line 353 of file callbacks.c.

bool cb_sc_follow ( GtkEntry *  entry,
girara_session_t *  session 
)

Called when input has been passed to the sc_follow dialog

Parameters
entryThe dialog inputbar
sessionThe girara session
Returns
true if no error occured and the event has been handled

Definition at line 347 of file callbacks.c.

void cb_setting_recolor_change ( girara_session_t *  session,
const char *  name,
girara_setting_type_t   UNUSEDtype,
void *  value,
void *  UNUSEDdata 
)

Definition at line 471 of file callbacks.c.

void cb_setting_recolor_keep_hue_change ( girara_session_t *  session,
const char *  name,
girara_setting_type_t   UNUSEDtype,
void *  value,
void *  UNUSEDdata 
)

Definition at line 489 of file callbacks.c.

bool cb_unknown_command ( girara_session_t *  session,
const char *  input 
)

Unknown command handler which is used to handle the strict numeric goto command

Parameters
sessionThe girara session
inputThe command input
Returns
true if the input has been handled

Definition at line 508 of file callbacks.c.

void cb_view_hadjustment_changed ( GtkAdjustment *  adjustment,
gpointer  data 
)

This function gets called when the bounds or the page_size of the horizontal scrollbar change (e.g. when the zoom level is changed).

It adjusts the value of the horizontal scrollbar

Parameters
adjustmentThe horizontal adjustment of a gtkScrolledWindow
dataThe zathura instance

Definition at line 141 of file callbacks.c.

void cb_view_hadjustment_value_changed ( GtkAdjustment *  adjustment,
gpointer  data 
)

This function gets called when the value of the horizontal scrollbars changes (e.g.: by scrolling, moving to another page)

Parameters
adjustmentThe hadjustment of the page view
dataNULL

Definition at line 89 of file callbacks.c.

bool cb_view_resized ( GtkWidget *  UNUSEDwidget,
GtkAllocation *  UNUSEDallocation,
zathura_t *  zathura 
)

Definition at line 453 of file callbacks.c.

void cb_view_vadjustment_changed ( GtkAdjustment *  adjustment,
gpointer  data 
)

This function gets called when the bounds or the page_size of the vertical scrollbar change (e.g. when the zoom level is changed).

It adjusts the value of the vertical scrollbar based on its previous adjustment, stored in the tracking adjustment zathura->ui.hadjustment.

Parameters
adjustmentThe vertical adjustment of a gtkScrolledWindow
dataThe zathura instance

Definition at line 169 of file callbacks.c.

void cb_view_vadjustment_value_changed ( GtkAdjustment *  adjustment,
gpointer  data 
)

This function gets called when the value of the vertical scrollbars changes (e.g.: by scrolling, moving to another page)

Parameters
adjustmentThe vadjustment of the page view
dataNULL

Definition at line 115 of file callbacks.c.