rofi 2.1.0
icon.c File Reference
#include "cairo.h"
#include "config.h"
#include "theme.h"
#include "widgets/icon.h"
#include "widgets/widget-internal.h"
#include "widgets/widget.h"
#include <stdio.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 *wid, G_GNUC_UNUSED const int width)
static int icon_get_desired_width (widget *wid, G_GNUC_UNUSED const int height)
static void icon_draw (widget *wid, cairo_t *draw)
static void icon_free (widget *wid)
static void icon_resize (widget *wid, short w, short h)
void icon_set_surface (icon *icon_widget, cairo_surface_t *surf)
icon * icon_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()

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

◆ icon_free()

void icon_free ( widget * wid)
static

Definition at line 129 of file icon.c.

References _icon::icon, and icon_free().

Referenced by icon_create(), and icon_free().

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

◆ icon_get_desired_height()

int icon_get_desired_height ( widget * wid,
G_GNUC_UNUSED const int width )
static

Definition at line 57 of file icon.c.

References _icon::icon, icon_get_desired_height(), _icon::size, _icon::squared, and widget_padding_get_padding_height().

Referenced by icon_create(), and icon_get_desired_height().

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

◆ icon_get_desired_width()

int icon_get_desired_width ( widget * wid,
G_GNUC_UNUSED const int height )
static

Definition at line 72 of file icon.c.

References _icon::icon, icon_get_desired_width(), _icon::size, _icon::squared, and widget_padding_get_padding_width().

Referenced by icon_create(), and icon_get_desired_width().

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

◆ icon_resize()

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

Definition at line 139 of file icon.c.

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

Referenced by icon_create(), and icon_resize().

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