Beispiel #1
0
item_opts_off(ITEM * item, Item_Options opts)
{
  ITEM *citem = item;		/* use a copy because set_item_opts must detect

				   NULL item itself to adjust its behavior */

  T((T_CALLED("item_opts_off(%p,%d)"), item, opts));

  if (opts & ~ALL_ITEM_OPTS)
    RETURN(E_BAD_ARGUMENT);
  else
    {
      Normalize_Item(citem);
      opts = citem->opt & ~(opts & ALL_ITEM_OPTS);
      returnCode(set_item_opts(item, opts));
    }
}
Beispiel #2
0
item_value(const ITEM * item)
{
  T((T_CALLED("item_value(%p)"), item));
  returnBool((Normalize_Item(item)->value) ? TRUE : FALSE);
}
Beispiel #3
0
item_userptr(const ITEM * item)
{
  T((T_CALLED("item_userptr(%p)"), (const void *)item));
  returnVoidPtr(Normalize_Item(item)->userptr);
}
Beispiel #4
0
set_item_userptr(ITEM * item, void *userptr)
{
  T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr));
  Normalize_Item(item)->userptr = userptr;
  RETURN(E_OK);
}
Beispiel #5
0
item_opts(const ITEM * item)
{
  T((T_CALLED("item_opts(%p)"), item));
  returnItemOpts(ALL_ITEM_OPTS & Normalize_Item(item)->opt);
}
/*---------------------------------------------------------------------------
|   Facility      :  libnmenu  
|   Function      :  bool item_value(const ITEM *item)
|   
|   Description   :  Return the selection value of the item
|
|   Return Values :  TRUE   - if item is selected
|                    FALSE  - if item is not selected
+--------------------------------------------------------------------------*/
bool item_value(const ITEM *item)
{
  return ((Normalize_Item(item)->value) ? TRUE : FALSE);
}