rofi  1.5.4
icon.c File Reference
#include <config.h>
#include <stdio.h>
#include "widgets/widget.h"
#include "widgets/widget-internal.h"
#include "widgets/icon.h"
#include "theme.h"
#include "rofi-icon-fetcher.h"
Include dependency graph for icon.c:

Go to the source code of this file.

Data Structures

struct  _icon
 

Macros

#define G_LOG_DOMAIN   "Widgets.Icon"
 

Functions

static int icon_get_desired_height (widget *widget)
 
static int icon_get_desired_width (widget *widget)
 
static void icon_draw (widget *wid, cairo_t *draw)
 
static void icon_free (widget *wid)
 
static void icon_resize (widget *widget, short w, short h)
 
void icon_set_surface (icon *icon, cairo_surface_t *surf)
 
iconicon_create (widget *parent, const char *name)
 

Macro Definition Documentation

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "Widgets.Icon"

The log domain of this widget.

Definition at line 30 of file icon.c.

Function Documentation

◆ icon_draw()

static void icon_draw ( widget wid,
cairo_t *  draw 
)
static

Definition at line 70 of file icon.c.

References _widget::h, _icon::icon, _icon::icon_fetch_id, rofi_icon_fetcher_get(), _icon::size, _widget::w, WIDGET, _icon::widget, widget_padding_get_bottom(), widget_padding_get_left(), widget_padding_get_right(), widget_padding_get_top(), _icon::xalign, and _icon::yalign.

Referenced by icon_create().

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

◆ icon_free()

static void icon_free ( widget wid)
static

Definition at line 104 of file icon.c.

References _icon::icon.

Referenced by icon_create().

Here is the caller graph for this function:

◆ icon_get_desired_height()

static int icon_get_desired_height ( widget widget)
static

Definition at line 55 of file icon.c.

References _icon::size, and widget_padding_get_padding_height().

Referenced by icon_create().

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

◆ icon_get_desired_width()

static int icon_get_desired_width ( widget widget)
static

Definition at line 62 of file icon.c.

References _icon::size, and widget_padding_get_padding_width().

Referenced by icon_create().

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

◆ icon_resize()

static void icon_resize ( widget widget,
short  w,
short  h 
)
static

Definition at line 115 of file icon.c.

References _widget::h, _widget::w, _icon::widget, and widget_update().

Referenced by icon_create().

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