summaryrefslogtreecommitdiff
path: root/iup/srclua5/iuplua_controls.c
blob: bd961bfc3ba2ef7c7401566d4a13bde380a44271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/** \file
 * \brief Bindig of iupcontrols to Lua 5.
 *
 * See Copyright Notice in "iup.h"
 */
 
#include <lua.h>
#include <lualib.h>

#include "iup.h"
#include "iupcontrols.h"

#include "iuplua.h"
#include "iupluacontrols.h"
#include "il.h"
#include "il_controls.h"

int iupcontrolslua_open(lua_State * L)
{
  if (iuplua_opencall_internal(L))
    IupControlsOpen();

  iuplua_changeEnv(L);

  iupgaugelua_open(L);
  iupmatrixlua_open(L);
  iupmasklua_open(L);
  iupdiallua_open(L);
  iupcolorbrowserlua_open(L);
  iupcellslua_open(L);
  iupcolorbarlua_open(L);

  iuplua_returnEnv(L);

  return 0;
}

int iupcontrolslua_close(lua_State * L)
{
  if (iuplua_opencall_internal(L))
    IupControlsClose();
  return 0;
}

/* obligatory to use require"iupluacontrols" */
int luaopen_iupluacontrols(lua_State* L)
{
  return iupcontrolslua_open(L);
}

/* obligatory to use require"iupluacontrols51" */
int luaopen_iupluacontrols51(lua_State* L)
{
  return iupcontrolslua_open(L);
}