Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道一个名字xcb_randr_monitor_info_t。它有一个name字段,但它是 type xcb_atom_t,而不是 achar [255]或类似的东西。我怎样才能把它变成一个(最好是 UTF-8)字符串?
xcb_randr_monitor_info_t
name
xcb_atom_t
char [255]
你正在寻找xcb_get_atom_name_name
xcb_get_atom_name_name
xcb_get_atom_name_reply_t *reply=xcb_get_atom_name_reply( dis, xcb_get_atom_name(dis, atom), NULL); char*name=xcb_get_atom_name_name(reply);