NetSurf
Macros | Functions | Variables
accelerator.c File Reference

GTK accelerator support. More...

#include <stdint.h>
#include <gtk/gtk.h>
#include "utils/log.h"
#include "utils/errors.h"
#include "utils/hashtable.h"
#include "gtk/resources.h"
#include "gtk/accelerator.h"
Include dependency graph for accelerator.c:

Go to the source code of this file.

Macros

#define HASH_SIZE   53
 acclelerators are stored in a fixed-size hash table. More...
 

Functions

nserror nsgtk_accelerator_init (char **respaths)
 
const char * nsgtk_accelerator_get_desc (const char *key)
 

Variables

static struct hash_tableaccelerators_hash = NULL
 The hash table used to store the accelerators. More...
 

Detailed Description

GTK accelerator support.

Definition in file accelerator.c.

Macro Definition Documentation

◆ HASH_SIZE

#define HASH_SIZE   53

acclelerators are stored in a fixed-size hash table.

Definition at line 36 of file accelerator.c.

Function Documentation

◆ nsgtk_accelerator_get_desc()

const char * nsgtk_accelerator_get_desc ( const char *  key)

Definition at line 72 of file accelerator.c.

References accelerators_hash, and hash_get().

Referenced by nsgtk_menu_add_image_item().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_accelerator_init()

nserror nsgtk_accelerator_init ( char **  respaths)

Definition at line 41 of file accelerator.c.

References accelerators_hash, hash_add_file(), hash_add_inline(), hash_create(), HASH_SIZE, NSERROR_NOMEM, NSERROR_OK, nsgtk_data_from_resname(), nsgtk_path_from_resname(), and NSLOG.

Referenced by nsgtk_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ accelerators_hash

struct hash_table* accelerators_hash = NULL
static

The hash table used to store the accelerators.

Definition at line 39 of file accelerator.c.

Referenced by nsgtk_accelerator_get_desc(), and nsgtk_accelerator_init().