
A number of things can result in doing I/O on the main thread such as loading GAppInfo or folder translations. The ShellAppCache provides a layer of abstraction around those things so that we can keep that work off the main thread by delaying a short while and processing the work synchronously off-main-thread. The results can then be marshalled back to the main thread for use by the rest of the system via the ShellAppCache::changed() signal.
20 lines
776 B
C
20 lines
776 B
C
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
#ifndef __SHELL_APP_CACHE__
|
|
#define __SHELL_APP_CACHE__
|
|
|
|
#include <gio/gio.h>
|
|
#include <gio/gdesktopappinfo.h>
|
|
|
|
#define SHELL_TYPE_APP_CACHE (shell_app_cache_get_type())
|
|
|
|
G_DECLARE_FINAL_TYPE (ShellAppCache, shell_app_cache, SHELL, APP_CACHE, GObject)
|
|
|
|
ShellAppCache *shell_app_cache_get_default (void);
|
|
GList *shell_app_cache_get_all (ShellAppCache *cache);
|
|
GDesktopAppInfo *shell_app_cache_get_info (ShellAppCache *cache,
|
|
const char *id);
|
|
char *shell_app_cache_translate_folder (ShellAppCache *cache,
|
|
const char *name);
|
|
|
|
#endif /* __SHELL_APP_CACHE__ */
|