Ewl_Stock { Ewl_Box b; struct { void (*txt)(Ewl_Stock *s, const char *txt); void (*alt_txt)(Ewl_Stock *s, const char *txt); void (*tooltip)(Ewl_Stock *s, const char *tooltip); void (*img)(Ewl_Stock *s, const char *path, const char *key); } set; struct { const char *(*txt)(Ewl_Stock *s); const char *(*alt_txt)(Ewl_Stock *s); const char *(*tooltip)(Ewl_Stock *s); const char *(*img_path)(Ewl_Stock *s); const char *(*img_name)(Ewl_Stock *s); } get; }; void ewl_stock_text_cb_set(Ewl_Stock *s, void (*set_txt)(Ewl_Stock *s, const char *txt)); void ewl_stock_image_cb_set(Ewl_Stock *s, void (*set_txt)(Ewl_Stock *s, const char *path, const char *key)) ----------------------- Ewl_Button { Ewl_Stock s; Ewl_Label *label; } b = ewl_button_new(); ewl_stock_text_cb_set(EWL_STOCK(b), ewl_button_cb_set_stocK_text); ewl_stock_image_cb_set(EWL_STOCK(b), ewl_button_cb_set_stock_iamge);