summaryrefslogtreecommitdiff
path: root/iup/srclua5/iuplua_imglib.c
blob: bece6d5e477ec20441b835e96e0a605961b3b926 (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
/** \file
 * \brief Iup Image Library Lua 5 Binding
 *
 * See Copyright Notice in cd.h
 */

#include <stdlib.h>
#include <stdio.h>

#include <lua.h>
#include <lauxlib.h>

#include "iup.h"
#include "iuplua.h"
#include "iupcontrols.h"
#include "il.h"


static int imagelibopen(lua_State *L)
{
  (void)L;
  IupImageLibOpen();
  return 0;
}

static int iupluaimglib_open (lua_State *L)
{
  IupImageLibOpen();
  
  iuplua_changeEnv(L);
  iuplua_register(L, imagelibopen, "ImageLibOpen");
  iuplua_returnEnv(L);
  return 0; /* nothing in stack */
}

int luaopen_iupluaimglib(lua_State* L)
{
  return iupluaimglib_open(L);
}

int luaopen_iupluaimglib51(lua_State* L)
{
  return iupluaimglib_open(L);
}