rofi 1.7.7
|
#include "config.h"
#include <stdlib.h>
#include <xcb/xproto.h>
#include "helper.h"
#include "rofi-icon-fetcher.h"
#include "rofi-types.h"
#include "settings.h"
#include <cairo.h>
#include <pango/pangocairo.h>
#include "keyb.h"
#include "view.h"
#include "xcb.h"
#include "nkutils-enum.h"
#include "nkutils-xdg-theme.h"
#include <stdint.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
Go to the source code of this file.
Data Structures | |
struct | IconFetcher |
struct | IconFetcherNameEntry |
struct | IconFetcherEntry |
Macros | |
#define | G_LOG_DOMAIN "Helpers.IconFetcher" |
#define | THUMBNAILER_ENTRY_GROUP "Thumbnailer Entry" |
#define | THUMBNAILER_EXTENSION ".thumbnailer" |
#define | RED_BYTE 2 |
#define | GREEN_BYTE 1 |
#define | BLUE_BYTE 0 |
#define | ALPHA_BYTE 3 |
Functions | |
static void | rofi_icon_fetch_entry_free (gpointer data) |
static void | rofi_icon_fetcher_load_thumbnailers (const gchar *path) |
static gchar ** | setup_thumbnailer_command (const gchar *command, const gchar *filename, const gchar *encoded_uri, const gchar *output_path, int size) |
static gboolean | exec_thumbnailer_command (gchar **command_args) |
static gboolean | rofi_icon_fetcher_create_thumbnail (const gchar *mime_type, const gchar *filename, const gchar *encoded_uri, const gchar *output_path, int size) |
static void | rofi_icon_fetch_thread_pool_entry_remove (gpointer data) |
void | rofi_icon_fetcher_init (void) |
static void | free_wrapper (gpointer data, G_GNUC_UNUSED gpointer user_data) |
void | rofi_icon_fetcher_destroy (void) |
static guchar | alpha_mult (guchar c, guchar a) |
static cairo_surface_t * | rofi_icon_fetcher_get_surface_from_pixbuf (GdkPixbuf *pixbuf) |
gboolean | rofi_icon_fetcher_file_is_image (const char *const path) |
static gchar * | rofi_icon_fetcher_get_thumbnail (gchar *name, int requested_size, int *thumb_size) |
static gchar * | rofi_icon_fetcher_get_desktop_icon (const gchar *file_path) |
static void | rofi_icon_fetcher_worker (thread_state *sdata, G_GNUC_UNUSED gpointer user_data) |
uint32_t | rofi_icon_fetcher_query_advanced (const char *name, const int wsize, const int hsize) |
uint32_t | rofi_icon_fetcher_query (const char *name, const int size) |
cairo_surface_t * | rofi_icon_fetcher_get (const uint32_t uid) |
gboolean | rofi_icon_fetcher_get_ex (const uint32_t uid, cairo_surface_t **surface) |
Variables | |
IconFetcher * | rofi_icon_fetcher_data = NULL |
#define ALPHA_BYTE 3 |
Location of alpha byte
Definition at line 357 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_get_surface_from_pixbuf().
#define BLUE_BYTE 0 |
Location of blue byte
Definition at line 355 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_get_surface_from_pixbuf().
#define G_LOG_DOMAIN "Helpers.IconFetcher" |
The log domain of this Helper.
Definition at line 29 of file rofi-icon-fetcher.c.
#define GREEN_BYTE 1 |
Location of green byte
Definition at line 353 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_get_surface_from_pixbuf().
#define RED_BYTE 2 |
Location of red byte
Definition at line 351 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_get_surface_from_pixbuf().
#define THUMBNAILER_ENTRY_GROUP "Thumbnailer Entry" |
Desktop entry specifying the thumbnailer.
Definition at line 55 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_load_thumbnailers().
#define THUMBNAILER_EXTENSION ".thumbnailer" |
Extension used for the thumbnailer.
Definition at line 57 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_load_thumbnailers().
|
inlinestatic |
Definition at line 369 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_get_surface_from_pixbuf().
|
static |
Definition at line 204 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_create_thumbnail(), and rofi_icon_fetcher_worker().
|
static |
Definition at line 321 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_destroy().
|
static |
Definition at line 255 of file rofi-icon-fetcher.c.
References IconFetcherNameEntry::name, IconFetcherNameEntry::sizes, and IconFetcherEntry::surface.
Referenced by rofi_icon_fetcher_init().
|
static |
Definition at line 249 of file rofi-icon-fetcher.c.
References IconFetcherEntry::query_started.
Referenced by rofi_icon_fetcher_query(), and rofi_icon_fetcher_query_advanced().
|
static |
Definition at line 223 of file rofi-icon-fetcher.c.
References exec_thumbnailer_command(), rofi_icon_fetcher_data, and setup_thumbnailer_command().
Referenced by rofi_icon_fetcher_worker().
|
static |
Definition at line 507 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_worker().
|
static |
Definition at line 383 of file rofi-icon-fetcher.c.
References ALPHA_BYTE, alpha_mult(), BLUE_BYTE, GREEN_BYTE, and RED_BYTE.
Referenced by rofi_icon_fetcher_worker().
|
static |
Definition at line 463 of file rofi-icon-fetcher.c.
References cache_dir.
Referenced by rofi_icon_fetcher_worker().
|
static |
Definition at line 105 of file rofi-icon-fetcher.c.
References rofi_icon_fetcher_data, THUMBNAILER_ENTRY_GROUP, and THUMBNAILER_EXTENSION.
Referenced by rofi_icon_fetcher_init().
|
static |
Definition at line 528 of file rofi-icon-fetcher.c.
References config, IconFetcherEntry::entry, exec_thumbnailer_command(), helper_get_theme_path(), helper_parse_setup(), IconFetcherEntry::hsize, IconFetcherNameEntry::name, IconFetcherEntry::query_done, rofi_icon_fetcher_create_thumbnail(), rofi_icon_fetcher_data, rofi_icon_fetcher_get_desktop_icon(), rofi_icon_fetcher_get_surface_from_pixbuf(), rofi_icon_fetcher_get_thumbnail(), rofi_view_reload(), IconFetcherEntry::surface, and IconFetcherEntry::wsize.
Referenced by rofi_icon_fetcher_query(), and rofi_icon_fetcher_query_advanced().
|
static |
Definition at line 161 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_create_thumbnail().
IconFetcher* rofi_icon_fetcher_data = NULL |
The icon fetcher internal state.
Definition at line 103 of file rofi-icon-fetcher.c.
Referenced by rofi_icon_fetcher_create_thumbnail(), rofi_icon_fetcher_destroy(), rofi_icon_fetcher_file_is_image(), rofi_icon_fetcher_get(), rofi_icon_fetcher_get_ex(), rofi_icon_fetcher_init(), rofi_icon_fetcher_load_thumbnailers(), rofi_icon_fetcher_query(), rofi_icon_fetcher_query_advanced(), and rofi_icon_fetcher_worker().