示例#1
0
static int Spin(lua_State *L)
{
  Ihandle *ih = IupSpin();
  iuplua_plugstate(L, ih);
  iuplua_pushihandle_raw(L, ih);
  return 1;
}
示例#2
0
static int iSpinboxCreateMethod(Ihandle* ih, void** params)
{
  Ihandle *spin = IupSpin();
  spin->flags |= IUP_INTERNAL;
  iupChildTreeAppend(ih, spin);  /* spin will always be the firstchild */

  iupAttribSet(spin, "_IUPSPIN_BOX", (char*)ih);  /* will be used by the callback */

  if (params)
  {
    Ihandle** iparams = (Ihandle**)params;
    if (*iparams)
      IupAppend(ih, *iparams);
  }

  return IUP_NOERROR;
}
示例#3
0
static void CreateSpin(void)
{
  int tag = (int)lua_getnumber(lua_getglobal("iuplua_tag"));
  lua_pushusertag(IupSpin(), tag);
}