Blender V2.61 - r43446
|
#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 PreviewImage * | BKE_previewimg_create (void) |
void | BKE_previewimg_freefunc (void *link) |
void | BKE_previewimg_free (PreviewImage **prv) |
struct PreviewImage * | BKE_previewimg_copy (PreviewImage *prv) |
void | BKE_previewimg_free_id (ID *id) |
PreviewImage * | BKE_previewimg_get (ID *id) |
void | BKE_icon_changed (int id) |
int | BKE_icon_getid (struct ID *id) |
Icon * | BKE_icon_get (int icon_id) |
void | BKE_icon_set (int icon_id, struct Icon *icon) |
void | BKE_icon_delete (struct ID *id) |
Variables | |
static GHash * | gIcons = NULL |
static int | gNextIconId = 1 |
static int | gFirstIconId = 1 |
Definition in file icons.c.
#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().
void BKE_icon_changed | ( | int | id | ) |
Definition at line 231 of file icons.c.
References BKE_previewimg_get(), BLI_ghash_lookup(), PreviewImage::changed, PreviewImage::changed_timestamp, G, i, NULL, NUM_ICON_SIZES, Icon::obj, and SET_INT_IN_POINTER.
Referenced by get_brush_icon(), image_changed(), image_initialize_after_load(), lamp_changed(), material_changed(), texture_changed(), and world_changed().
void BKE_icon_delete | ( | struct ID * | id | ) |
Definition at line 314 of file icons.c.
References BLI_ghash_remove(), icon_free(), ID::icon_id, NULL, and SET_INT_IN_POINTER.
Referenced by free_image(), free_lamp(), free_material(), free_texture(), and free_world().
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 | ) |
Definition at line 254 of file icons.c.
References BLI_ghash_insert(), Icon::drawinfo, Icon::drawinfo_free, G, get_next_free_id(), GS, ID::icon_id, MEM_callocN(), ID::name, NULL, Icon::obj, SET_INT_IN_POINTER, and Icon::type.
Referenced by get_brush_icon(), IDnames_to_dyn_pupstring(), image_changed(), image_initialize_after_load(), lamp_changed(), material_changed(), texture_changed(), ui_id_brush_get_icon(), ui_id_icon_get(), and world_changed().
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] |
Definition at line 119 of file icons.c.
References PreviewImage::changed, PreviewImage::changed_timestamp, i, MEM_callocN(), NULL, and NUM_ICON_SIZES.
Referenced by BKE_previewimg_get().
void BKE_previewimg_free | ( | PreviewImage ** | prv | ) |
Definition at line 149 of file icons.c.
References BKE_previewimg_freefunc(), and NULL.
Referenced by BKE_previewimg_free_id(), free_brush(), free_image(), free_lamp(), free_material(), free_texture(), and free_world().
void BKE_previewimg_free_id | ( | ID * | id | ) |
Definition at line 175 of file icons.c.
References BKE_previewimg_free(), GS, ID_BR, ID_IM, ID_LA, ID_MA, ID_TE, ID_WO, ID::name, Brush::preview, Image::preview, Lamp::preview, World::preview, Tex::preview, and Material::preview.
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] |
Definition at line 198 of file icons.c.
References BKE_previewimg_create(), GS, ID_BR, ID_IM, ID_LA, ID_MA, ID_TE, ID_WO, ID::name, NULL, Brush::preview, Image::preview, Lamp::preview, World::preview, Tex::preview, and Material::preview.
Referenced by BKE_icon_changed(), icon_draw_size(), ui_id_brush_render(), and ui_id_icon_render().
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().
int gFirstIconId = 1 [static] |
Definition at line 62 of file icons.c.
Referenced by BKE_icons_init(), and get_next_free_id().
int gNextIconId = 1 [static] |
Definition at line 60 of file icons.c.
Referenced by BKE_icons_init(), and get_next_free_id().