コード例 #1
0
ファイル: il_tree.c プロジェクト: DavidPhillipOster/IupCocoa
static int tree_gettableid(Ihandle* ih, lua_Object o)
{
  int ref = tree_getnumberintable(o);
  if(ref == 0)
		return -1;
  return IupTreeGetId(ih, (void*) ref);
}
コード例 #2
0
ファイル: rb_iuptree.c プロジェクト: phasis68/ruby-iup
VALUE rb_IupTreeGetId(VALUE node,VALUE v_userid)
{
    int v;
    void *userid = (void*)NUM2ULONG(v_userid);
    VALUE v_ih = rb_iv_get(node,"@ihandle");
    v = IupTreeGetId((Ihandle*)NUM2ULONG(v_ih),userid);
    return INT2FIX((int)v);
}
コード例 #3
0
ファイル: iuplua_tree_aux.c プロジェクト: mwoz/Hildim.Source
static int TreeGetId(lua_State *L)
{
  Ihandle *ih = iuplua_checkihandle(L,1);
  int ref = tree_gettableref(L, 2);
  if (ref == LUA_NOREF)
    lua_pushnil(L);
  else
  {
    int id;
    if (ref >= 0) ref++;  /* only positive references are shifted */
    id = IupTreeGetId(ih, (void*)ref);
    if (id == -1)
      lua_pushnil(L);
    else
      lua_pushinteger(L, id);
  }
  return 1;        
}
コード例 #4
0
ファイル: il_tree_aux.c プロジェクト: svn2github/iup-iup
static int TreeGetId(lua_State *L)
{
  Ihandle *h = iuplua_checkihandle(L,1);
  int ref = gettableref(L, 2);
  if(ref == 0)
  {
    lua_pushnil(L);
  }
  else
  {
    int id = IupTreeGetId(h, (char*) ref);
    if(id < 0)
      lua_pushnil(L);
    else
      lua_pushnumber(L,id);
  }
  return 1;        
}
コード例 #5
0
ファイル: il_tree.c プロジェクト: DavidPhillipOster/IupCocoa
static void cfTreeGetId(void)
{
  lua_pushnumber(IupTreeGetId(iuplua_checkihandle(1), check_userdata(2)));
}