OpenClonk
fileicon.c File Reference
#include <stdlib.h>
#include <gtk/gtk.h>
#include "mape/fileicon.h"
Include dependency graph for fileicon.c:

Go to the source code of this file.

Functions

MapeFileIconSetmape_file_icon_set_new (GtkWidget *widget)
 
void mape_file_icon_set_destroy (MapeFileIconSet *set)
 
MapeFileIconmape_file_icon_set_lookup (MapeFileIconSet *set, MapeFileIconType type)
 
GdkPixbuf * mape_file_icon_get (MapeFileIcon *icon)
 

Function Documentation

◆ mape_file_icon_get()

GdkPixbuf* mape_file_icon_get ( MapeFileIcon icon)

Definition at line 137 of file fileicon.c.

138 {
139  return icon->pixbuf;
140 }
GdkPixbuf * pixbuf
Definition: fileicon.h:38

References MapeFileIcon_::pixbuf.

Referenced by mape_mat_tex_view_reload().

Here is the caller graph for this function:

◆ mape_file_icon_set_destroy()

void mape_file_icon_set_destroy ( MapeFileIconSet set)

Definition at line 122 of file fileicon.c.

123 {
124  unsigned int i;
125  for(i = 0; i < MAPE_FILE_ICON_COUNT; ++ i)
126  mape_file_icon_destroy(set->icons[i]);
127 }
@ MAPE_FILE_ICON_COUNT
Definition: fileicon.h:33
MapeFileIcon * icons[MAPE_FILE_ICON_COUNT]
Definition: fileicon.h:42

References MAPE_FILE_ICON_COUNT.

Referenced by mape_window_destroy().

Here is the caller graph for this function:

◆ mape_file_icon_set_lookup()

MapeFileIcon* mape_file_icon_set_lookup ( MapeFileIconSet set,
MapeFileIconType  type 
)

Definition at line 129 of file fileicon.c.

131 {
132  g_assert(type < MAPE_FILE_ICON_COUNT);
133 
134  return set->icons[type];
135 }

References MapeFileIconSet_::icons, and MAPE_FILE_ICON_COUNT.

Referenced by mape_mat_tex_view_reload().

Here is the caller graph for this function:

◆ mape_file_icon_set_new()

MapeFileIconSet* mape_file_icon_set_new ( GtkWidget *  widget)

Definition at line 109 of file fileicon.c.

110 {
111  MapeFileIconSet* set;
112  unsigned int i;
113 
114  set = malloc(sizeof(MapeFileIconSet) );
115 
116  for(i = 0; i < MAPE_FILE_ICON_COUNT; ++ i)
117  set->icons[i] = mape_file_icon_new(widget, (MapeFileIconType)i);
118 
119  return set;
120 }
enum MapeFileIconType_ MapeFileIconType

References MapeFileIconSet_::icons, and MAPE_FILE_ICON_COUNT.

Referenced by mape_window_new().

Here is the caller graph for this function: