Blender V2.61 - r43446
Defines | Functions | Variables

icons.c File Reference

#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#include "DNA_brush_types.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BKE_icons.h"
#include "BKE_global.h"
#include "BLO_sys_types.h"

Go to the source code of this file.

Defines

#define GS(a)   (*((short *)(a)))

Functions

static void icon_free (void *val)
static int get_next_free_id (void)
void BKE_icons_init (int first_dyn_id)
void BKE_icons_free (void)
struct PreviewImageBKE_previewimg_create (void)
void BKE_previewimg_freefunc (void *link)
void BKE_previewimg_free (PreviewImage **prv)
struct PreviewImageBKE_previewimg_copy (PreviewImage *prv)
void BKE_previewimg_free_id (ID *id)
PreviewImageBKE_previewimg_get (ID *id)
void BKE_icon_changed (int id)
int BKE_icon_getid (struct ID *id)
IconBKE_icon_get (int icon_id)
void BKE_icon_set (int icon_id, struct Icon *icon)
void BKE_icon_delete (struct ID *id)

Variables

static GHashgIcons = NULL
static int gNextIconId = 1
static int gFirstIconId = 1

Detailed Description

Definition in file icons.c.


Define Documentation

#define GS (   a)    (*((short *)(a)))

Definition at line 54 of file icons.c.

Referenced by acf_generic_group_offset(), act_new_exec(), action_idcode_patch_check(), ANIM_apply_keyingset(), animchan_sync_fcurve(), animchan_sync_group(), animdata_filter_dopesheet(), animdata_filter_ds_textures(), animsys_write_rna_setting(), BKE_animdata_set_action(), BKE_copy_animdata_id(), BKE_icon_getid(), BKE_keyingset_add_path(), BKE_previewimg_free_id(), BKE_previewimg_get(), BLO_blendhandle_get_previews(), bpath_traverse_id(), buttons_context_path_texture(), buttons_texture_users_from_context(), common_preview_endjob(), copy_animedit_keys(), copy_mtex_copybuf(), createTransTexspace(), dag_add_driver_relation(), dag_add_node(), dag_id_flush_update(), dag_id_flush_update__isDependentTexture(), DAG_id_tag_update(), draw_nla_channel_list_gl(), drivers_path_rename_fix(), dtar_get_pchan_ptr(), dtar_id_ensure_proxy_from(), dvar_eval_locDiff(), dvar_eval_transChan(), ED_node_changed_update(), ED_node_set_active(), ED_node_shader_default(), ED_object_shape_key_remove(), ed_preview_draw_rect(), ED_render_id_flush_update(), ED_vgroup_data_create(), ED_vgroup_give_array(), ED_vgroup_give_parray(), face_duplilist(), flag_render_node_material(), get_driver_path_hack(), give_active_mtex(), give_obdata_texspace(), icon_preview_startjob(), icu_to_fcurves(), id_drop_copy(), id_frame_has_keyframe(), id_type_can_have_animdata(), mouse_nla_channels(), namebutton_cb(), new_particle_duplilist(), nlaedit_add_actionclip_exec(), nlaedit_add_sound_exec(), node_area_refresh(), node_drop_poll(), node_group_edit_invoke(), node_tree_from_ID(), nodeClearActiveID(), nodeGetActiveID(), nodes_use_tex(), nodeSetActive(), nodeSetActiveID(), object_duplilist_recursive(), outliner_add_element(), outliner_add_id_contents(), outliner_buttons(), paste_mtex_copybuf(), pyrna_prop_repr(), pyrna_struct_repr(), rna_id_write_error(), set_active_mtex(), set_operation_types(), shader_preview_render(), shader_preview_updatejob(), skip_fcurve_selected_data(), template_ID(), template_id_cb(), texture_slot_move(), time_draw_idblock_keyframes(), tselem_draw_icon(), ui_but_anim_expression_create(), ui_id_icon_get(), uiIconFromID(), uiTemplateConstraint(), uiTemplateImageSettings(), uiTemplateModifier(), uiTemplatePreview(), unlink_group_cb(), unlink_material_cb(), unlink_texture_cb(), vertex_duplilist(), view3d_ima_drop_poll(), view3d_mat_drop_poll(), and view3d_ob_drop_poll().


Function Documentation

void BKE_icon_changed ( int  id)
void BKE_icon_delete ( struct ID id)
Icon* BKE_icon_get ( int  icon_id) [read]

Definition at line 285 of file icons.c.

References BLI_ghash_lookup(), NULL, and SET_INT_IN_POINTER.

Referenced by icon_draw_size(), UI_icon_get_height(), and UI_icon_get_width().

int BKE_icon_getid ( struct ID id)
void BKE_icon_set ( int  icon_id,
struct Icon icon 
)

Definition at line 299 of file icons.c.

References BLI_ghash_insert(), BLI_ghash_lookup(), NULL, and SET_INT_IN_POINTER.

Referenced by def_internal_icon(), and def_internal_vicon().

void BKE_icons_free ( void  )

Definition at line 112 of file icons.c.

References BLI_ghash_free(), icon_free(), and NULL.

Referenced by main(), and UI_icons_free().

void BKE_icons_init ( int  first_dyn_id)

Definition at line 103 of file icons.c.

References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash(), gFirstIconId, and gNextIconId.

Referenced by main(), and UI_icons_init().

struct PreviewImage* BKE_previewimg_copy ( PreviewImage prv) [read]

Definition at line 157 of file icons.c.

References i, MEM_dupallocN(), NULL, NUM_ICON_SIZES, and PreviewImage::rect.

Referenced by copy_lamp(), copy_material(), copy_texture(), and copy_world().

struct PreviewImage* BKE_previewimg_create ( void  ) [read]
void BKE_previewimg_free ( PreviewImage **  prv)
void BKE_previewimg_free_id ( ID id)
void BKE_previewimg_freefunc ( void *  link)

Definition at line 133 of file icons.c.

References i, MEM_freeN(), NULL, NUM_ICON_SIZES, and PreviewImage::rect.

Referenced by BKE_previewimg_free(), and filelist_from_library().

PreviewImage* BKE_previewimg_get ( ID id) [read]
static int get_next_free_id ( void  ) [static]

Definition at line 83 of file icons.c.

References BLI_ghash_lookup(), gFirstIconId, gNextIconId, and SET_INT_IN_POINTER.

Referenced by BKE_icon_getid().

static void icon_free ( void *  val) [static]

Definition at line 65 of file icons.c.

References Icon::drawinfo, Icon::drawinfo_free, MEM_freeN(), and simple_enum_gen::val.

Referenced by BKE_icon_delete(), and BKE_icons_free().


Variable Documentation

int gFirstIconId = 1 [static]

Definition at line 62 of file icons.c.

Referenced by BKE_icons_init(), and get_next_free_id().

GHash* gIcons = NULL [static]

Definition at line 58 of file icons.c.

int gNextIconId = 1 [static]

Definition at line 60 of file icons.c.

Referenced by BKE_icons_init(), and get_next_free_id().