enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src display-lua.pkg, 1.1, 1.2 display-lua.hh, 1.2, 1


From: Daniel Heck <address@hidden>
Subject: [Enigma-cvs] enigma/src display-lua.pkg, 1.1, 1.2 display-lua.hh, 1.2, 1.3 display-lua.cc, 1.2, 1.3
Date: Sun, 16 Nov 2003 19:19:23 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv7589/src

Modified Files:
        display-lua.pkg display-lua.hh display-lua.cc 
Log Message:
Export GetSurface(), CropSurface(), DefineImageModel()


Index: display-lua.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/display-lua.hh,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** display-lua.hh      24 Jun 2003 07:55:57 -0000      1.2
--- display-lua.hh      16 Nov 2003 19:19:21 -0000      1.3
***************
*** 1,5 ****
  /*
  ** Lua binding: display
! ** Generated automatically by tolua 4.0a on Sun Jun 15 15:17:50 2003.
  */
  
--- 1,5 ----
  /*
  ** Lua binding: display
! ** Generated automatically by tolua 4.0a on Sat Nov  8 21:17:01 2003.
  */
  

Index: display-lua.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/display-lua.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** display-lua.cc      24 Jun 2003 07:55:57 -0000      1.2
--- display-lua.cc      16 Nov 2003 19:19:21 -0000      1.3
***************
*** 1,5 ****
  /*
  ** Lua binding: display
! ** Generated automatically by tolua 4.0a on Sun Jun 15 15:17:50 2003.
  */
  
--- 1,5 ----
  /*
  ** Lua binding: display
! ** Generated automatically by tolua 4.0a on Sat Nov  8 21:17:01 2003.
  */
  
***************
*** 11,23 ****
--- 11,95 ----
  
  #include "display.hh"
+ #include "d_models.hh"
  using namespace display;
  using px::Rect;
+ using px::Surface;
  
  /* function to register type */
  static void toluaI_reg_types (lua_State* tolua_S)
  {
+  tolua_usertype(tolua_S,"Surface");
   tolua_usertype(tolua_S,"Rect");
  }
  
+ /* function: GetSurface */
+ static int toluaI_display_GetSurface00(lua_State* tolua_S)
+ {
+  if (
+  !tolua_istype(tolua_S,1,LUA_TSTRING,0) ||
+  !tolua_isnoobj(tolua_S,2)
+  )
+  goto tolua_lerror;
+  else
+  {
+   const char* name = ((const char*)  tolua_getstring(tolua_S,1,0));
+  {
+   Surface* toluaI_ret = (Surface*)  GetSurface(name);
+  tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"Surface"));
+  }
+  }
+  return 1;
+ tolua_lerror:
+  tolua_error(tolua_S,"#ferror in function 'GetSurface'.");
+  return 0;
+ }
+ 
+ /* function: CropSurface */
+ static int toluaI_display_CropSurface00(lua_State* tolua_S)
+ {
+  if (
+  !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"const Surface"),0) ||
+  !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"Rect"),0) ||
+  !tolua_isnoobj(tolua_S,3)
+  )
+  goto tolua_lerror;
+  else
+  {
+   const Surface* s = ((const Surface*)  tolua_getusertype(tolua_S,1,0));
+   Rect r = *((Rect*)  tolua_getusertype(tolua_S,2,0));
+  {
+   Surface* toluaI_ret = (Surface*)  CropSurface(s,r);
+  tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"Surface"));
+  }
+  }
+  return 1;
+ tolua_lerror:
+  tolua_error(tolua_S,"#ferror in function 'CropSurface'.");
+  return 0;
+ }
+ 
+ /* function: DefineImageModel */
+ static int toluaI_display_DefineImageModel00(lua_State* tolua_S)
+ {
+  if (
+  !tolua_istype(tolua_S,1,LUA_TSTRING,0) ||
+  !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"Surface"),0) ||
+  !tolua_isnoobj(tolua_S,3)
+  )
+  goto tolua_lerror;
+  else
+  {
+   const char* name = ((const char*)  tolua_getstring(tolua_S,1,0));
+   Surface* s = ((Surface*)  tolua_getusertype(tolua_S,2,0));
+  {
+   DefineImageModel(name,s);
+  }
+  }
+  return 0;
+ tolua_lerror:
+  tolua_error(tolua_S,"#ferror in function 'DefineImageModel'.");
+  return 0;
+ }
+ 
  /* function: SetFollowMode */
  static int toluaI_display_display_SetFollowMode00(lua_State* tolua_S)
***************
*** 305,308 ****
--- 377,383 ----
   tolua_open(tolua_S);
   toluaI_reg_types(tolua_S);
+  tolua_function(tolua_S,NULL,"GetSurface",toluaI_display_GetSurface00);
+  tolua_function(tolua_S,NULL,"CropSurface",toluaI_display_CropSurface00);
+  
tolua_function(tolua_S,NULL,"DefineImageModel",toluaI_display_DefineImageModel00);
   tolua_module(tolua_S,"display");
   tolua_constant(tolua_S,"display","FOLLOW_SCROLLING",FOLLOW_SCROLLING);
***************
*** 323,326 ****
--- 398,404 ----
  void tolua_display_close (lua_State* tolua_S)
  {
+  lua_pushnil(tolua_S); lua_setglobal(tolua_S,"GetSurface");
+  lua_pushnil(tolua_S); lua_setglobal(tolua_S,"CropSurface");
+  lua_pushnil(tolua_S); lua_setglobal(tolua_S,"DefineImageModel");
   lua_pushnil(tolua_S); lua_setglobal(tolua_S,"display");
  }

Index: display-lua.pkg
===================================================================
RCS file: /cvsroot/enigma/enigma/src/display-lua.pkg,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** display-lua.pkg     15 Jun 2003 10:26:39 -0000      1.1
--- display-lua.pkg     16 Nov 2003 19:19:21 -0000      1.2
***************
*** 20,25 ****
--- 20,32 ----
  
  $#include "display.hh"
+ $#include "d_models.hh"
  $using namespace display;
  $using px::Rect;
+ $using px::Surface;
+ 
+ 
+ Surface *GetSurface (const char *name);
+ Surface *CropSurface (const Surface *s, Rect r);
+ void     DefineImageModel (const char *name, Surface *s);
  
  module display
***************
*** 31,34 ****
--- 38,56 ----
      };
      void SetFollowMode(FollowMode m);
+ 
+ 
+ /* -------------------- Models -------------------- */
+ 
+ //     class Image;
+ //     class Model;
+ 
+ //     class ImageModel : public Model {
+ //    ImageModel(Image *i, int xo, int yo);
+ //    ImageModel(Surface *s, int xo, int yo);
+ //    ImageModel(Surface *s, const Rect &r, int xo, int yo);
+ //     };
+ 
+ 
+ /* -------------------- Functions -------------------- */
  
      void DefineImage(const char *name, const char *fname,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]