Update shortcuts function to girara interface

This commit is contained in:
Moritz Lipp 2011-02-09 23:53:18 +08:00
parent 5e7a774101
commit a97cda9176
2 changed files with 64 additions and 43 deletions

View File

@ -8,7 +8,7 @@
#include "zathura.h"
bool
sc_abort(girara_session_t* session, girara_argument_t* argument)
sc_abort(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
g_return_val_if_fail(session != NULL, false);
@ -18,19 +18,19 @@ sc_abort(girara_session_t* session, girara_argument_t* argument)
}
bool
sc_adjust_window(girara_session_t* session, girara_argument_t* argument)
sc_adjust_window(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_change_buffer(girara_session_t* session, girara_argument_t* argument)
sc_change_buffer(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_change_mode(girara_session_t* session, girara_argument_t* argument)
sc_change_mode(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
g_return_val_if_fail(session != NULL, false);
@ -40,7 +40,7 @@ sc_change_mode(girara_session_t* session, girara_argument_t* argument)
}
bool
sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument)
sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
g_return_val_if_fail(session != NULL, false);
@ -58,19 +58,19 @@ sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument)
}
bool
sc_follow(girara_session_t* session, girara_argument_t* argument)
sc_follow(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_goto(girara_session_t* session, girara_argument_t* argument)
sc_goto(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_navigate(girara_session_t* session, girara_argument_t* argument)
sc_navigate(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
if (!session || !argument || !Zathura.document) {
return false;
@ -91,25 +91,25 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument)
}
bool
sc_recolor(girara_session_t* session, girara_argument_t* argument)
sc_recolor(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_reload(girara_session_t* session, girara_argument_t* argument)
sc_reload(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_rotate(girara_session_t* session, girara_argument_t* argument)
sc_rotate(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_scroll(girara_session_t* session, girara_argument_t* argument)
sc_scroll(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
GtkAdjustment* adjustment = NULL;
if ( (argument->n == LEFT) || (argument->n == RIGHT) )
@ -161,52 +161,52 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument)
}
bool
sc_search(girara_session_t* session, girara_argument_t* argument)
sc_search(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_switch_goto_mode(girara_session_t* session, girara_argument_t* argument)
sc_switch_goto_mode(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_navigate_index(girara_session_t* session, girara_argument_t* argument)
sc_navigate_index(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_toggle_index(girara_session_t* session, girara_argument_t* argument)
sc_toggle_index(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_toggle_inputbar(girara_session_t* session, girara_argument_t* argument)
sc_toggle_inputbar(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument)
sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_toggle_statusbar(girara_session_t* session, girara_argument_t* argument)
sc_toggle_statusbar(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}
bool
sc_quit(girara_session_t* session, girara_argument_t* argument)
sc_quit(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
girara_argument_t arg = { GIRARA_HIDE, NULL };
girara_isc_completion(session, &arg);
girara_isc_completion(session, &arg, 0);
cb_destroy(NULL, NULL);
@ -216,7 +216,7 @@ sc_quit(girara_session_t* session, girara_argument_t* argument)
}
bool
sc_zoom(girara_session_t* session, girara_argument_t* argument)
sc_zoom(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
return false;
}

View File

@ -10,188 +10,209 @@
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_abort(girara_session_t* session, girara_argument_t* argument);
bool sc_abort(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Adjust the rendered pages to the window
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_adjust_window(girara_session_t* session, girara_argument_t* argument);
bool sc_adjust_window(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Modify the current buffer
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_change_buffer(girara_session_t* session, girara_argument_t* argument);
bool sc_change_buffer(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Change the current mode
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_change_mode(girara_session_t* session, girara_argument_t* argument);
bool sc_change_mode(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Focus the inputbar
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument);
bool sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Follow a link
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_follow(girara_session_t* session, girara_argument_t* argument);
bool sc_follow(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Go to a specific page or position
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_goto(girara_session_t* session, girara_argument_t* argument);
bool sc_goto(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Navigate through the document
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_navigate(girara_session_t* session, girara_argument_t* argument);
bool sc_navigate(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Recolor the pages
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_recolor(girara_session_t* session, girara_argument_t* argument);
bool sc_recolor(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Reload the current document
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_reload(girara_session_t* session, girara_argument_t* argument);
bool sc_reload(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Rotate the pages
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_rotate(girara_session_t* session, girara_argument_t* argument);
bool sc_rotate(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Scroll through the pages
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_scroll(girara_session_t* session, girara_argument_t* argument);
bool sc_scroll(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Search through the document for the latest search item
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_search(girara_session_t* session, girara_argument_t* argument);
bool sc_search(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Switch go to mode (numeric, labels)
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_switch_goto_mode(girara_session_t* session, girara_argument_t* argument);
bool sc_switch_goto_mode(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Navigate through the index of the document
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_navigate_index(girara_session_t* session, girara_argument_t* argument);
bool sc_navigate_index(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Show/Hide the index of the document
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_toggle_index(girara_session_t* session, girara_argument_t* argument);
bool sc_toggle_index(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Show/Hide the inputbar
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_toggle_inputbar(girara_session_t* session, girara_argument_t* argument);
bool sc_toggle_inputbar(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Toggle fullscreen mode
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument);
bool sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Show/Hide the statusbar
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_toggle_statusbar(girara_session_t* session, girara_argument_t* argument);
bool sc_toggle_statusbar(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Quit zathura
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_quit(girara_session_t* session, girara_argument_t* argument);
bool sc_quit(girara_session_t* session, girara_argument_t* argument, unsigned int t);
/**
* Change the zoom level
*
* @param session The used girara session
* @param argument The used argument
* @param t Number of executions
* @return true if no error occured otherwise false
*/
bool sc_zoom(girara_session_t* session, girara_argument_t* argument);
bool sc_zoom(girara_session_t* session, girara_argument_t* argument, unsigned int t);
#endif // SHORTCUTS_H