ListUpdateIcon

From TrillWiki

Jump to: navigation, search

Change the icon for an item in the list.

Compatibility: 1.0 and higher

Contents

Syntax

plugin_send(MYGUID, "listUpdateIcon", struct list_entry_t *);

Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.

Parameters

ListUpdateIcon utilitizes the list_entry_t structure.

struct list_entry_t 
{
    unsigned int               struct_size;

    int                        num_left_icons;        
    struct list_bmp_t          *left_icons;

    int                        num_right_icons;        
    struct list_bmp_t          *right_icons;

    struct list_font_t         font;

    int                         section_id;
    int                         parent_id;
    int                         previous_id;
    int                         unique_id;

    int                         group;                
    int                         section;

    int                         drag_and_drop;
    int                         inline_editing;        
    int                         selectable;            
    int                         expanded;            
    int                         auto_expand;
    int                         no_group_icon;
    int                         no_double_click;
    int                         owner_drawn;
    int                         no_section_margins;
    
    int                         floating;
    int                         floating_x;
    int                         floating_y;

    char                        *tooltip;            
    char                        *text;                
    char                        *edit_string;
    char                        *real_name;

    void                        *data;                
    
    struct menu_entry_t         *menu_entry;

    ttkCallback                 callback;

    /* 2.0 
     */
    int                         inline_editing_quick;

    /* 3.0
     */
    int                         icon_mode;
    int                         icon_width;
    int                         icon_height;

    char                        *icon_name;
    char                        *panel;
};



unique_id
The list id that should be updated.
num_left_icons
The number of left icons in the array.
left_icons
An array of list_bmp_t structures for each left icon. See list_bmp_t below for more information.
num_right_icons
The number of right icons in the array.
right_icons
An array of list_bmp_t structures for each right icon. See listAddEntry for more information.


Return Value

Negative value on error, 0 on success.

Remarks

None.



See also: listAddEntry

Additional Structures

list_bmp_t

 struct list_bmp_t { 
 	unsigned int   		struct_size; 
 
 	int			num_states; 
 	HBITMAP			*bitmap; 
 	RECT			*location; 
 
 	int			animated; 
 	int			time; 
 	int			loop; 
 	int			cur_state; 
 
 	int			*skin_based;   
 	char			**skin_name; 
 	char			**skin_type; 
 	char			**skin_state; 
 };


num_states
The number of states for a particular bitmap. Each bitmap can have one or many states. Each state represents a different bitmap/location combination as listed in the arrays bitmap and location within this structure.
bitmap
An array of HBITMAP where each item in the array corresponds to the cur_state. The array length must equal the same as num_states.
location
An array of RECT where each item in the array corresponds to the RECT and the location of the image to use on the associated bitmap. The array length must equal the same as num_states.
cur_state
The current state of the icon. If you do not wish the icon to be shown, please set this to -1, otherwise set it to 0 through num_states-1.
skin_based
An array consisting of whether or not to use the skin based icon or the bitmap/location combination above. This array must be the same length as num_states. If an array entry is equal to 1, the skin_name/skin_type/skin_state are used instead of the bitmap/location combination, otherwise the bitmap/location combination is used.
skin_name
An array of strings representing the name to use within the skin for a particular icon. The array must be the same length as num_states. If the name is not needed or if the bitmap/location combination is used, set the array entry to NULL.
skin_type
An array of strings representing the type to use within the skin for a particular icon. The array must be the same length as num_states. If the type is not needed or if the bitmap/location combination is used, set the array entry to NULL.
skin_state
An array of strings representing the state to use within the skin for a particular icon. The array must be the same length as num_states. If the state is not needed or if the bitmap/location combination is used, set the array entry to NULL.