Aggiunta get_focus_id

git-svn-id: svn://10.65.10.50/trunk@2933 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1996-05-29 10:27:13 +00:00
parent d95f3d2b6b
commit a6aa890338
2 changed files with 14 additions and 1 deletions

@ -22,6 +22,19 @@ typedef struct _stx_data
#endif
short get_focus_id(WINDOW win)
{
XI_OBJ * itf = xi_get_itf(win);
XI_OBJ * obj = xi_get_focus(itf);
if (obj == NULL || obj->type == XIT_ITF)
return -1;
if (obj->type == XIT_CELL || (obj->type == XIT_BTN && obj->v.btn->type == XIBT_RADIOBTN))
obj = obj->parent;
return obj->cid;
}
#define CAMPI_SCAVATI FALSE
HIDDEN int X_FU_MULTIPLE = 0;

@ -21,7 +21,7 @@ WINDOW create_interface(WINDOW parent, short x, short y, short dx, short dy,
const char* caption, TWindow* mask, bool tags);
void attach_interface(WINDOW win, COLOR back = COLOR_WHITE);
short get_focus_id(WINDOW win);
///////////////////////////////////////////////////////////
// Custom control