mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 00:13:47 +01:00
Added some function comments
This commit is contained in:
parent
e043e55b13
commit
ccfe1d9fba
21
callbacks.h
21
callbacks.h
@ -6,8 +6,29 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <girara.h>
|
#include <girara.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Quits the current zathura session
|
||||||
|
*
|
||||||
|
* @param widget The gtk window of zathura
|
||||||
|
* @param data NULL
|
||||||
|
* @return TRUE
|
||||||
|
*/
|
||||||
gboolean cb_destroy(GtkWidget* widget, gpointer data);
|
gboolean cb_destroy(GtkWidget* widget, gpointer data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function gets called when the buffer of girara changes
|
||||||
|
*
|
||||||
|
* @param session The girara session
|
||||||
|
*/
|
||||||
void buffer_changed(girara_session_t* session);
|
void buffer_changed(girara_session_t* session);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function gets called when the the value of the vertical scrollbars
|
||||||
|
* changes (e.g.: by scrolling, moving to another page)
|
||||||
|
*
|
||||||
|
* @param adjustment The vadjustment of the page view
|
||||||
|
* @param data NULL
|
||||||
|
*/
|
||||||
void cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data);
|
void cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data);
|
||||||
|
|
||||||
#endif // CALLBACKS_H
|
#endif // CALLBACKS_H
|
||||||
|
29
utils.h
29
utils.h
@ -6,9 +6,38 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the given file exists
|
||||||
|
*
|
||||||
|
* @param path Path to the file
|
||||||
|
* @return true if the file exists, otherwise false
|
||||||
|
*/
|
||||||
bool file_exists(const char* path);
|
bool file_exists(const char* path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the file extension of a path
|
||||||
|
*
|
||||||
|
* @param path Path to the file
|
||||||
|
* @return The file extension or NULL
|
||||||
|
*/
|
||||||
const char* file_get_extension(const char* path);
|
const char* file_get_extension(const char* path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Executes a system command and saves its output into output
|
||||||
|
*
|
||||||
|
* @param argv The command
|
||||||
|
* @param output Pointer where the output will be saved
|
||||||
|
* @return true if no error occured, otherwise false
|
||||||
|
*/
|
||||||
bool execute_command(char* const argv[], char** output);
|
bool execute_command(char* const argv[], char** output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a blank page
|
||||||
|
*
|
||||||
|
* @param width The width of the page
|
||||||
|
* @param height The height of the page
|
||||||
|
* @return The widget of the page or NULL if an error occured
|
||||||
|
*/
|
||||||
GtkWidget* page_blank(unsigned int width, unsigned int height);
|
GtkWidget* page_blank(unsigned int width, unsigned int height);
|
||||||
|
|
||||||
#endif // UTILS_H
|
#endif // UTILS_H
|
||||||
|
Loading…
Reference in New Issue
Block a user