mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
More source code documentation updates
This commit is contained in:
parent
32b45c2d10
commit
d2576e9f1f
3 changed files with 22 additions and 1 deletions
|
@ -36,6 +36,9 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of all scopes the mouse can interact on.
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SCOPE_GLOBAL,
|
SCOPE_GLOBAL,
|
||||||
|
@ -136,6 +139,9 @@ typedef enum
|
||||||
SELECT_ELEMENT_10,
|
SELECT_ELEMENT_10,
|
||||||
} KeyBindingAction;
|
} KeyBindingAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actions mouse can take on the ListView.
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SCROLL_LEFT = 1,
|
SCROLL_LEFT = 1,
|
||||||
|
@ -144,6 +150,9 @@ typedef enum
|
||||||
SCROLL_UP,
|
SCROLL_UP,
|
||||||
} MouseBindingListviewAction;
|
} MouseBindingListviewAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actions mouse can take on the ListView element.
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
SELECT_HOVERED_ENTRY = 1,
|
SELECT_HOVERED_ENTRY = 1,
|
||||||
|
@ -151,6 +160,9 @@ typedef enum
|
||||||
ACCEPT_HOVERED_CUSTOM,
|
ACCEPT_HOVERED_CUSTOM,
|
||||||
} MouseBindingListviewElementAction;
|
} MouseBindingListviewElementAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default mouse actions.
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
MOUSE_CLICK_DOWN = 1,
|
MOUSE_CLICK_DOWN = 1,
|
||||||
|
|
|
@ -122,6 +122,7 @@ ActionBindingEntry rofi_bindings[] =
|
||||||
{ .id = ACCEPT_HOVERED_CUSTOM, .scope = SCOPE_MOUSE_LISTVIEW_ELEMENT, .name = "me-accept-custom", .binding = "Control+MouseDPrimary", .comment = "Accept hovered row with custom action" },
|
{ .id = ACCEPT_HOVERED_CUSTOM, .scope = SCOPE_MOUSE_LISTVIEW_ELEMENT, .name = "me-accept-custom", .binding = "Control+MouseDPrimary", .comment = "Accept hovered row with custom action" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Default binding of mouse button to action. */
|
||||||
static const gchar *mouse_default_bindings[] = {
|
static const gchar *mouse_default_bindings[] = {
|
||||||
[MOUSE_CLICK_DOWN] = "MousePrimary",
|
[MOUSE_CLICK_DOWN] = "MousePrimary",
|
||||||
[MOUSE_CLICK_UP] = "!MousePrimary",
|
[MOUSE_CLICK_UP] = "!MousePrimary",
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Log domain */
|
||||||
#define G_LOG_DOMAIN "Rofi"
|
#define G_LOG_DOMAIN "Rofi"
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -76,8 +77,9 @@
|
||||||
// TODO: move this check to mode.c
|
// TODO: move this check to mode.c
|
||||||
#include "mode-private.h"
|
#include "mode-private.h"
|
||||||
|
|
||||||
// Pidfile.
|
/** Location of pidfile for this instance. */
|
||||||
char *pidfile = NULL;
|
char *pidfile = NULL;
|
||||||
|
/** Location of Cache directory. */
|
||||||
const char *cache_dir = NULL;
|
const char *cache_dir = NULL;
|
||||||
|
|
||||||
/** List of error messages.*/
|
/** List of error messages.*/
|
||||||
|
@ -91,6 +93,7 @@ void rofi_add_error_message ( GString *str )
|
||||||
|
|
||||||
/** Path to the configuration file */
|
/** Path to the configuration file */
|
||||||
G_MODULE_EXPORT char *config_path = NULL;
|
G_MODULE_EXPORT char *config_path = NULL;
|
||||||
|
/** Path to the configuration file in the new format */
|
||||||
G_MODULE_EXPORT char *config_path_new = NULL;
|
G_MODULE_EXPORT char *config_path_new = NULL;
|
||||||
/** Array holding all activated modi. */
|
/** Array holding all activated modi. */
|
||||||
Mode **modi = NULL;
|
Mode **modi = NULL;
|
||||||
|
@ -104,6 +107,7 @@ unsigned int num_modi = 0;
|
||||||
/** Current selected mode */
|
/** Current selected mode */
|
||||||
unsigned int curr_switcher = 0;
|
unsigned int curr_switcher = 0;
|
||||||
|
|
||||||
|
/** Handle to NkBindings object for input devices. */
|
||||||
NkBindings *bindings = NULL;
|
NkBindings *bindings = NULL;
|
||||||
|
|
||||||
/** Glib main loop. */
|
/** Glib main loop. */
|
||||||
|
@ -620,6 +624,10 @@ static gboolean setup_modi ( void )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Quit rofi mainloop.
|
||||||
|
* This will exit program.
|
||||||
|
**/
|
||||||
void rofi_quit_main_loop ( void )
|
void rofi_quit_main_loop ( void )
|
||||||
{
|
{
|
||||||
g_main_loop_quit ( main_loop );
|
g_main_loop_quit ( main_loop );
|
||||||
|
|
Loading…
Reference in a new issue