wxlstate.cpp File Reference

#include "wx/wxprec.h"
#include "wx/wx.h"
#include "wxlua/include/wxlstate.h"
#include "wxlua/include/wxlcallb.h"
#include "wx/tokenzr.h"
#include <limits.h>
Include dependency graph for wxlstate.cpp:

Go to the source code of this file.

Defines

#define ABS_LUA_STKIDX(n, added_items)   ((n) > 0 ? (n) : (n)-(added_items))
#define M_WXLSTATEDATA   ((wxLuaStateRefData*)m_refData)
#define LUA_PATH   "LUA_PATH"
#define BITLIB_FLOAT_BITS   53
#define BITLIB_FLOAT_MAX   0xfffffffffffffL
#define BITLIB_FLOAT_MIN   (-0x10000000000000L)
#define BITLIB_FLOAT_UMAX   0x1fffffffffffffULL
#define LUA_INTEGER_MAX   PTRDIFF_MAX
#define LUA_INTEGER_MIN   PTRDIFF_MIN
#define SIZE_MAX   ((size_t)-1)
#define LUA_UINTEGER_MAX   SIZE_MAX
#define BIT_BITS
#define BIT_MAX   (CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_MAX : LUA_INTEGER_MAX)
#define BIT_MIN   (CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_MIN : LUA_INTEGER_MIN)
#define BIT_UMAX   (CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_UMAX : LUA_UINTEGER_MAX)
#define BUILTIN_CAST
#define TOBIT(L, n, res)   ((void)(res), luaL_checkinteger((L), (n)))
#define BIT_TRUNCATE(i)   ((i) & BIT_UMAX)
#define MONADIC(name, op)
#define VARIADIC(name, op)
#define LOGICAL_SHIFT(name, op)
#define ARITHMETIC_SHIFT(name, op)

Typedefs

typedef size_t lua_UInteger

Functions

int LUACALL luaopen_bit (lua_State *L)
int LUACALL wxlua_printFunction (lua_State *L)
void LUACALL wxlua_debugHookFunction (lua_State *L, lua_Debug *LDebug)
void wxlua_lreg_createtable (lua_State *L, void *lightuserdata_reg_key, int narr, int nrec)
wxString wxlua_LUA_ERR_msg (int LUA_ERRx)
bool wxlua_errorinfo (lua_State *L, int status, int top, wxString *errorMsg_, int *line_num_)
void LUACALL wxlua_error (lua_State *L, const char *errorMsg)
void LUACALL wxlua_argerror (lua_State *L, int stack_idx, const wxString &expectedType)
void LUACALL wxlua_argerrormsg (lua_State *L, const wxString &msg_)
void *LUACALL wxlua_touserdata (lua_State *L, int stack_idx, bool null_ptr)
int wxluaR_ref (lua_State *L, int stack_idx, void *lightuserdata_reg_key)
bool wxluaR_unref (lua_State *L, int ref_idx, void *lightuserdata_reg_key)
bool LUACALL wxluaR_getref (lua_State *L, int ref_idx, void *lightuserdata_reg_key)
int LUACALL wxluaR_isrefed (lua_State *L, int stack_idx, void *lightuserdata_reg_key)
void LUACALL wxluaO_addgcobject (lua_State *L, wxObject *wxobj)
void LUACALL wxluaO_addgcobject (lua_State *L, void *obj_ptr, wxObject *wxobj)
bool LUACALL wxluaO_deletegcobject (lua_State *L, void *udata, void *obj_ptr, int flags)
bool LUACALL wxluaO_undeletegcobject (lua_State *L, void *obj_ptr)
bool LUACALL wxluaO_isgcobject (lua_State *L, void *obj_ptr)
wxArrayString LUACALL wxluaO_getgcobjectinfo (lua_State *L)
void LUACALL wxluaO_trackweakobject (lua_State *L, int udata_stack_idx, void *obj_ptr, int wxl_type)
int LUACALL wxluaO_untrackweakobject (lua_State *L, void *udata, void *obj_ptr)
bool LUACALL wxluaO_istrackedweakobject (lua_State *L, void *obj_ptr, int wxl_type, bool push_on_stack)
wxArrayString LUACALL wxluaO_gettrackedweakobjectinfo (lua_State *L)
void LUACALL wxluaW_addtrackedwindow (lua_State *L, wxObject *wxobj)
void LUACALL wxluaW_removetrackedwindow (lua_State *L, wxWindow *win)
bool LUACALL wxluaW_istrackedwindow (lua_State *L, wxWindow *win, bool check_parents)
wxArrayString LUACALL wxluaW_gettrackedwindowinfo (lua_State *L)
int wxluaT_newmetatable (lua_State *L, int wxl_type)
bool LUACALL wxluaT_getmetatable (lua_State *L, int wxl_type)
bool LUACALL wxluaT_setmetatable (lua_State *L, int wxl_type)
int LUACALL wxluaT_type (lua_State *L, int stack_idx)
wxString LUACALL wxluaT_typename (lua_State *L, int wxl_type)
wxString LUACALL wxluaT_gettypename (lua_State *L, int stack_idx)
wxString LUACALL wxlua_luaL_typename (lua_State *L, int stack_idx)
int LUACALL wxluaT_gettype (lua_State *L, const char *class_name)
const wxLuaBindClass *LUACALL wxluaT_getclass (lua_State *L, int wxl_type)
const wxLuaBindClass *LUACALL wxluaT_getclass (lua_State *L, const char *class_name)
bool wxluaT_isuserdatatype (lua_State *L, int stack_idx, int wxl_type)
void *LUACALL wxluaT_getuserdatatype (lua_State *L, int stack_idx, int wxl_type)
bool LUACALL wxluaT_pushuserdatatype (lua_State *L, const void *obj_ptr, int wxl_type, bool track, bool allow_NULL)
static int wxluaT_isderivedtype_recurser (const wxLuaBindClass *wxlClass, int base_wxl_type, int levels)
int LUACALL wxluaT_isderivedtype (lua_State *L, int wxl_type, int base_wxl_type)
int LUACALL wxluaT_isderivedclass (const wxLuaBindClass *wxlClass, const wxLuaBindClass *base_wxlClass)
int LUACALL wxlua_iswxluatype (int luatype, int wxl_type, lua_State *L)
int wxlua_luatowxluatype (int luatype)
int wxlua_wxluatoluatype (int wxlarg)
bool wxlua_iswxstringtype (lua_State *L, int stack_idx)
const char *LUACALL wxlua_getstringtype (lua_State *L, int stack_idx)
wxString LUACALL wxlua_getwxStringtype (lua_State *L, int stack_idx)
bool LUACALL wxlua_getbooleantype (lua_State *L, int stack_idx)
long LUACALL wxlua_getenumtype (lua_State *L, int stack_idx)
long LUACALL wxlua_getintegertype (lua_State *L, int stack_idx)
unsigned long LUACALL wxlua_getuintegertype (lua_State *L, int stack_idx)
double LUACALL wxlua_getnumbertype (lua_State *L, int stack_idx)
const char **LUACALL wxlua_getchararray (lua_State *L, int stack_idx, int &count)
wxString *LUACALL wxlua_getwxStringarray (lua_State *L, int stack_idx, int &count)
int *LUACALL wxlua_getintarray (lua_State *L, int stack_idx, int &count)
wxLuaSmartwxArrayString LUACALL wxlua_getwxArrayString (lua_State *L, int stack_idx)
wxLuaSmartwxSortedArrayString
LUACALL 
wxlua_getwxSortedArrayString (lua_State *L, int stack_idx)
wxLuaSmartwxArrayInt LUACALL wxlua_getwxArrayInt (lua_State *L, int stack_idx)
int LUACALL wxlua_pushwxArrayStringtable (lua_State *L, const wxArrayString &strArray)
int LUACALL wxlua_pushwxArrayInttable (lua_State *L, const wxArrayInt &intArray)
void LUACALL wxlua_pushwxString (lua_State *L, const wxString &str)
wxString wxlua_concatwxArrayString (const wxArrayString &arr, const wxString &sep)
int wxlua_pushargs (lua_State *L, wxChar **argv, int argc, int start_n)
bool LUACALL wxlua_setderivedmethod (lua_State *L, void *obj_ptr, const char *method_name, wxLuaObject *wxlObj)
bool LUACALL wxlua_hasderivedmethod (lua_State *L, void *obj_ptr, const char *method_name, bool push_method)
bool LUACALL wxlua_removederivedmethods (lua_State *L, void *obj_ptr)
bool LUACALL wxlua_getcallbaseclassfunction (lua_State *L)
void LUACALL wxlua_setcallbaseclassfunction (lua_State *L, bool call_base)
wxEventType LUACALL wxlua_getwxeventtype (lua_State *L)
void LUACALL wxlua_setwxeventtype (lua_State *L, wxEventType evt_type)
wxLuaStateData *LUACALL wxlua_getwxluastatedata (lua_State *L)
static wxWindow * wxFindWindowPointerRecursively (const wxWindow *parent, const wxWindow *win)
static wxWindow * wxFindWindowByPointer (const wxWindow *parent, const wxWindow *win)
bool wxLuaCleanupWindows (lua_State *L, bool only_check)
static int LUACALL wxlua_traceback (lua_State *L)
static int bit_cast (lua_State *L)
static int bit_bnot (lua_State *L)
static int bit_band (lua_State *L)
static int bit_bor (lua_State *L)
static int bit_bxor (lua_State *L)
static int bit_lshift (lua_State *L)
static int bit_rshift (lua_State *L)
static int bit_arshift (lua_State *L)

Variables

const char * wxlua_lreg_types_key = "wxLua metatable class types"
const char * wxlua_lreg_refs_key = "wxLua Lua object refs"
const char * wxlua_lreg_debug_refs_key = "wxLuaDebugData refs"
const char * wxlua_lreg_classes_key = "wxLuaBindClass structs"
const char * wxlua_lreg_derivedmethods_key = "wxLua derived class methods"
const char * wxlua_lreg_wxluastate_key = "wxLuaState"
const char * wxlua_lreg_wxluabindings_key = "wxLuaBindings"
const char * wxlua_lreg_weakobjects_key = "wxLua objects pushed"
const char * wxlua_lreg_gcobjects_key = "wxLua gc objects to delete"
const char * wxlua_lreg_evtcallbacks_key = "wxLuaEventCallbacks"
const char * wxlua_lreg_windestroycallbacks_key = "wxLuaWinDestoyCallbacks"
const char * wxlua_lreg_topwindows_key = "wxLua top level wxWindows"
const char * wxlua_lreg_callbaseclassfunc_key = "wxLua CallBaseClassFunc"
const char * wxlua_lreg_wxeventtype_key = "wxLua wxEventType"
const char * wxlua_lreg_wxluastatedata_key = "wxLuaStateData"
const char * wxlua_lreg_regtable_key = "wxLua LUA_REGISTRYINDEX tables"
const char * wxlua_metatable_type_key = "wxLua metatable class type"
const char * wxlua_metatable_wxluabindclass_key = "wxLua metatable wxLuaBindClass"
wxLuaState wxNullLuaState (false)
static struct luaL_reg bitlib []

Define Documentation

#define ABS_LUA_STKIDX ( n,
added_items   )     ((n) > 0 ? (n) : (n)-(added_items))

Definition at line 354 of file wxlstate.cpp.

Referenced by wxluaO_trackweakobject(), wxluaR_isrefed(), and wxluaR_ref().

#define ARITHMETIC_SHIFT ( name,
op   ) 
Value:
static int bit_ ## name(lua_State *L) {                               \
    lua_Number f;                                                       \
    lua_pushinteger(L, BIT_TRUNCATE((lua_Integer)TOBIT(L, 1, f) op      \
                                    (unsigned)luaL_checknumber(L, 2))); \
    return 1;                                                           \
  }

Definition at line 4204 of file wxlstate.cpp.

#define BIT_BITS
Value:
(CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ?                 \
   BITLIB_FLOAT_BITS : (CHAR_BIT * sizeof(lua_Integer)))

Definition at line 4128 of file wxlstate.cpp.

Referenced by luaopen_bit().

#define BIT_MAX   (CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_MAX : LUA_INTEGER_MAX)

Definition at line 4135 of file wxlstate.cpp.

#define BIT_MIN   (CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_MIN : LUA_INTEGER_MIN)

Definition at line 4138 of file wxlstate.cpp.

#define BIT_TRUNCATE (  )     ((i) & BIT_UMAX)

Definition at line 4163 of file wxlstate.cpp.

#define BIT_UMAX   (CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_UMAX : LUA_UINTEGER_MAX)

Definition at line 4141 of file wxlstate.cpp.

#define BITLIB_FLOAT_BITS   53

Definition at line 4104 of file wxlstate.cpp.

#define BITLIB_FLOAT_MAX   0xfffffffffffffL

Definition at line 4105 of file wxlstate.cpp.

#define BITLIB_FLOAT_MIN   (-0x10000000000000L)

Definition at line 4106 of file wxlstate.cpp.

#define BITLIB_FLOAT_UMAX   0x1fffffffffffffULL

Definition at line 4110 of file wxlstate.cpp.

#define BUILTIN_CAST

Definition at line 4145 of file wxlstate.cpp.

#define LOGICAL_SHIFT ( name,
op   ) 
Value:
static int bit_ ## name(lua_State *L) {                               \
    lua_Number f;                                                       \
    lua_pushinteger(L, BIT_TRUNCATE(BIT_TRUNCATE((lua_UInteger)TOBIT(L, 1, f)) op \
                                    (unsigned)luaL_checknumber(L, 2))); \
    return 1;                                                           \
  }

Definition at line 4196 of file wxlstate.cpp.

#define LUA_INTEGER_MAX   PTRDIFF_MAX

Definition at line 4114 of file wxlstate.cpp.

#define LUA_INTEGER_MIN   PTRDIFF_MIN

Definition at line 4115 of file wxlstate.cpp.

#define LUA_PATH   "LUA_PATH"

Definition at line 4002 of file wxlstate.cpp.

Referenced by wxLuaState::AddLuaPath(), and wxLuaState::GetLuaPath().

#define LUA_UINTEGER_MAX   SIZE_MAX

Definition at line 4123 of file wxlstate.cpp.

#define M_WXLSTATEDATA   ((wxLuaStateRefData*)m_refData)

Definition at line 2321 of file wxlstate.cpp.

Referenced by wxLuaState::AddGCObject(), wxLuaState::AddTrackedEventCallback(), wxLuaState::AddTrackedWinDestroyCallback(), wxLuaState::AddTrackedWindow(), wxLuaState::ClearDebugHookBreak(), wxLuaState::CloseLuaState(), wxLuaState::Create(), wxLuaState::DebugHookBreak(), wxLuaState::DeleteGCObject(), wxLuaState::Destroy(), wxLuaState::GarbageCollectWindows(), wxLuaState::GetBindClass(), wxLuaState::GetBooleanType(), wxLuaState::GetCallBaseClassFunction(), wxLuaState::GetCharArray(), wxLuaState::GetDebugHookBreak(), wxLuaState::GetDebugHookBreakMessage(), wxLuaState::GetEventHandler(), wxLuaState::GetGCObjectInfo(), wxLuaState::GetGlobals(), wxLuaState::GetId(), wxLuaState::GetInEventType(), wxLuaState::GetIntArray(), wxLuaState::GetIntegerType(), wxLuaState::GetLastLuaDebugHookTime(), wxLuaState::GetLuaDebugHook(), wxLuaState::GetLuaDebugHookCount(), wxLuaState::GetLuaDebugHookSendEvt(), wxLuaState::GetLuaDebugHookYield(), wxLuaState::GetLuaState(), wxLuaState::GetLuaStateData(), wxLuaState::GetNumberType(), wxLuaState::GetStringType(), wxLuaState::GetTrackedEventCallbackInfo(), wxLuaState::GetTrackedWinDestroyCallbackInfo(), wxLuaState::GetTrackedWindowInfo(), wxLuaState::GetUserDataType(), wxLuaState::GetwxArrayInt(), wxLuaState::GetwxArrayString(), wxLuaState::GetwxLuaTypeName(), wxLuaState::GetwxStringArray(), wxLuaState::GetwxStringType(), wxLuaState::HasDerivedMethod(), wxLuaState::IsBooleanType(), wxLuaState::IsClosing(), wxLuaState::IsDerivedType(), wxLuaState::IsGCObject(), wxLuaState::IsIntegerType(), wxLuaState::IsNumberType(), wxLuaState::IsRunning(), wxLuaState::IsStringType(), wxLuaState::IsTrackedWindow(), wxLuaState::IsUserDataType(), wxLuaState::IswxLuaType(), wxLuaState::IswxStringType(), wxLuaState::lua_Call(), wxLuaState::lua_CheckStack(), wxLuaState::lua_Concat(), wxLuaState::lua_CPCall(), wxLuaState::lua_CreateTable(), wxLuaState::lua_Dump(), wxLuaState::lua_Equal(), wxLuaState::lua_Error(), wxLuaState::lua_GetFenv(), wxLuaState::lua_GetField(), wxLuaState::lua_GetGCCount(), wxLuaState::lua_GetGlobal(), wxLuaState::lua_GetHook(), wxLuaState::lua_GetHookCount(), wxLuaState::lua_GetHookMask(), wxLuaState::lua_GetInfo(), wxLuaState::lua_GetLocal(), wxLuaState::lua_GetMetatable(), wxLuaState::lua_GetStack(), wxLuaState::lua_GetTable(), wxLuaState::lua_GetTop(), wxLuaState::lua_GetUpvalue(), wxLuaState::lua_Insert(), wxLuaState::lua_IsBoolean(), wxLuaState::lua_IsCFunction(), wxLuaState::lua_IsFunction(), wxLuaState::lua_IsLightUserdata(), wxLuaState::lua_IsNil(), wxLuaState::lua_IsNone(), wxLuaState::lua_IsNoneOrNil(), wxLuaState::lua_IsNumber(), wxLuaState::lua_IsString(), wxLuaState::lua_IsTable(), wxLuaState::lua_IsThread(), wxLuaState::lua_IsUserdata(), wxLuaState::lua_LessThan(), wxLuaState::lua_NewTable(), wxLuaState::lua_NewUserdata(), wxLuaState::lua_Next(), wxLuaState::lua_PCall(), wxLuaState::lua_Pop(), wxLuaState::lua_PushBoolean(), wxLuaState::lua_PushCClosure(), wxLuaState::lua_PushCFunction(), wxLuaState::lua_PushInteger(), wxLuaState::lua_PushLightUserdata(), wxLuaState::lua_PushLString(), wxLuaState::lua_PushNil(), wxLuaState::lua_PushNumber(), wxLuaState::lua_PushString(), wxLuaState::lua_PushValue(), wxLuaState::lua_RawEqual(), wxLuaState::lua_RawGet(), wxLuaState::lua_RawGeti(), wxLuaState::lua_RawSet(), wxLuaState::lua_RawSeti(), wxLuaState::lua_Register(), wxLuaState::lua_Remove(), wxLuaState::lua_Replace(), wxLuaState::lua_Resume(), wxLuaState::lua_SetFenv(), wxLuaState::lua_SetField(), wxLuaState::lua_SetGlobal(), wxLuaState::lua_SetHook(), wxLuaState::lua_SetLocal(), wxLuaState::lua_SetMetatable(), wxLuaState::lua_SetTable(), wxLuaState::lua_SetTop(), wxLuaState::lua_SetUpvalue(), wxLuaState::lua_Status(), wxLuaState::lua_StrLen(), wxLuaState::lua_ToBoolean(), wxLuaState::lua_ToCFunction(), wxLuaState::lua_ToInteger(), wxLuaState::lua_ToNumber(), wxLuaState::lua_ToPointer(), wxLuaState::lua_ToString(), wxLuaState::lua_ToThread(), wxLuaState::lua_ToUserdata(), wxLuaState::lua_TowxString(), wxLuaState::lua_Type(), wxLuaState::lua_TypeName(), wxLuaState::lua_XMove(), wxLuaState::lua_Yield(), wxLuaState::luaI_OpenLib(), wxLuaState::luaL_ArgCheck(), wxLuaState::luaL_ArgError(), wxLuaState::luaL_CallMeta(), wxLuaState::luaL_CheckAny(), wxLuaState::luaL_CheckInt(), wxLuaState::luaL_CheckInteger(), wxLuaState::luaL_CheckLong(), wxLuaState::luaL_CheckLString(), wxLuaState::luaL_CheckNumber(), wxLuaState::luaL_CheckOption(), wxLuaState::luaL_CheckStack(), wxLuaState::luaL_CheckString(), wxLuaState::luaL_CheckType(), wxLuaState::luaL_CheckUdata(), wxLuaState::luaL_Error(), wxLuaState::luaL_GetMetafield(), wxLuaState::luaL_GetMetatable(), wxLuaState::luaL_LoadBuffer(), wxLuaState::luaL_LoadFile(), wxLuaState::luaL_LoadString(), wxLuaState::luaL_NewMetatable(), wxLuaState::luaL_ObjLen(), wxLuaState::luaL_OptInt(), wxLuaState::luaL_OptInteger(), wxLuaState::luaL_OptLong(), wxLuaState::luaL_OptLString(), wxLuaState::luaL_OptNumber(), wxLuaState::luaL_OptString(), wxLuaState::luaL_Ref(), wxLuaState::luaL_Register(), wxLuaState::luaL_TypeError(), wxLuaState::luaL_Unref(), wxLuaState::luaL_Where(), wxLuaState::LuaPCall(), wxLuaState::Ok(), wxLuaState::PushwxArrayIntTable(), wxLuaState::PushwxArrayStringTable(), wxLuaState::RegisterFunction(), wxLuaState::RemoveDerivedMethods(), wxLuaState::RemoveTrackedEventCallback(), wxLuaState::RemoveTrackedWinDestroyCallback(), wxLuaState::RemoveTrackedWindow(), wxLuaState::RunBuffer(), wxLuaState::RunFile(), wxLuaState::SendEvent(), wxLuaState::SetCallBaseClassFunction(), wxLuaState::SetDerivedMethod(), wxLuaState::SetEventHandler(), wxLuaState::SetId(), wxLuaState::SetInEventType(), wxLuaState::SetLastLuaDebugHookTime(), wxLuaState::SetLuaDebugHook(), wxLuaState::wxlua_Error(), wxLuaState::wxlua_ToUserdata(), wxLuaState::wxluaR_GetRef(), wxLuaState::wxluaR_Ref(), wxLuaState::wxluaR_Unref(), wxLuaState::wxluaT_NewMetatable(), wxLuaState::wxluaT_PushUserDataType(), wxLuaState::wxluaT_SetMetatable(), and wxLuaState::wxluaT_Type().

#define MONADIC ( name,
op   ) 
Value:
static int bit_ ## name(lua_State *L) {                       \
    lua_Number f;                                               \
    lua_pushinteger(L, BIT_TRUNCATE(op TOBIT(L, 1, f)));        \
    return 1;                                                   \
  }

Definition at line 4178 of file wxlstate.cpp.

#define SIZE_MAX   ((size_t)-1)

Definition at line 4118 of file wxlstate.cpp.

#define TOBIT ( L,
n,
res   )     ((void)(res), luaL_checkinteger((L), (n)))

Definition at line 4149 of file wxlstate.cpp.

#define VARIADIC ( name,
op   ) 
Value:
static int bit_ ## name(lua_State *L) {       \
    lua_Number f;                               \
    int n = lua_gettop(L), i;                   \
    lua_Integer w = TOBIT(L, 1, f);             \
    for (i = 2; i <= n; i++)                    \
      w op TOBIT(L, i, f);                      \
    lua_pushinteger(L, BIT_TRUNCATE(w));        \
    return 1;                                   \
  }

Definition at line 4185 of file wxlstate.cpp.


Typedef Documentation

typedef size_t lua_UInteger

Definition at line 4122 of file wxlstate.cpp.


Function Documentation

static int bit_arshift ( lua_State *  L  )  [static]

Definition at line 4219 of file wxlstate.cpp.

static int bit_band ( lua_State *  L  )  [static]

Definition at line 4214 of file wxlstate.cpp.

static int bit_bnot ( lua_State *  L  )  [static]

Definition at line 4213 of file wxlstate.cpp.

static int bit_bor ( lua_State *  L  )  [static]

Definition at line 4215 of file wxlstate.cpp.

static int bit_bxor ( lua_State *  L  )  [static]

Definition at line 4216 of file wxlstate.cpp.

static int bit_cast ( lua_State *  L  )  [static]

Definition at line 4212 of file wxlstate.cpp.

static int bit_lshift ( lua_State *  L  )  [static]

Definition at line 4217 of file wxlstate.cpp.

static int bit_rshift ( lua_State *  L  )  [static]

Definition at line 4218 of file wxlstate.cpp.

int LUACALL luaopen_bit ( lua_State *  L  ) 

Definition at line 4234 of file wxlstate.cpp.

References BIT_BITS, and bitlib.

Referenced by wxLuaState::Create().

static wxWindow* wxFindWindowByPointer ( const wxWindow *  parent,
const wxWindow *  win 
) [static]

Definition at line 1994 of file wxlstate.cpp.

References wxFindWindowPointerRecursively().

Referenced by wxLuaCleanupWindows().

static wxWindow* wxFindWindowPointerRecursively ( const wxWindow *  parent,
const wxWindow *  win 
) [static]

Definition at line 1966 of file wxlstate.cpp.

Referenced by wxFindWindowByPointer().

void LUACALL wxlua_argerror ( lua_State *  L,
int  stack_idx,
const wxString &  expectedType 
)
void LUACALL wxlua_argerrormsg ( lua_State *  L,
const wxString &  msg_ 
)
wxString wxlua_concatwxArrayString ( const wxArrayString &  arr,
const wxString &  sep 
)
void LUACALL wxlua_debugHookFunction ( lua_State *  L,
lua_Debug *  LDebug 
)
void LUACALL wxlua_error ( lua_State *  L,
const char *  errorMsg 
)
bool wxlua_errorinfo ( lua_State *  L,
int  status,
int  top,
wxString *  errorMsg_,
int *  line_num_ 
)

Definition at line 235 of file wxlstate.cpp.

References lua2wx(), and wxlua_LUA_ERR_msg().

Referenced by wxLuaState::CompileBuffer(), and wxLuaState::SendLuaErrorEvent().

bool LUACALL wxlua_getbooleantype ( lua_State *  L,
int  stack_idx 
)

Definition at line 1429 of file wxlstate.cpp.

References wxlua_argerror(), wxlua_iswxluatype(), and WXLUA_TBOOLEAN.

Referenced by wxLuaState::GetBooleanType().

bool LUACALL wxlua_getcallbaseclassfunction ( lua_State *  L  ) 

Definition at line 1915 of file wxlstate.cpp.

References wxlua_lreg_callbaseclassfunc_key.

Referenced by wxLuaState::GetCallBaseClassFunction().

const char** LUACALL wxlua_getchararray ( lua_State *  L,
int  stack_idx,
int &  count 
)

Definition at line 1520 of file wxlstate.cpp.

References wxlua_argerror(), and wxlua_getstringtype().

Referenced by wxLuaState::GetCharArray().

long LUACALL wxlua_getenumtype ( lua_State *  L,
int  stack_idx 
)

Definition at line 1445 of file wxlstate.cpp.

References wxlua_argerror(), wxlua_iswxluatype(), and WXLUA_TINTEGER.

int* LUACALL wxlua_getintarray ( lua_State *  L,
int  stack_idx,
int &  count 
)

Definition at line 1564 of file wxlstate.cpp.

References wxlua_getwxArrayInt().

Referenced by wxLuaState::GetIntArray().

long LUACALL wxlua_getintegertype ( lua_State *  L,
int  stack_idx 
)

Definition at line 1461 of file wxlstate.cpp.

References wxlua_argerror(), wxlua_iswxluatype(), and WXLUA_TINTEGER.

Referenced by wxLuaState::GetIntegerType().

double LUACALL wxlua_getnumbertype ( lua_State *  L,
int  stack_idx 
)
const char* LUACALL wxlua_getstringtype ( lua_State *  L,
int  stack_idx 
)
unsigned long LUACALL wxlua_getuintegertype ( lua_State *  L,
int  stack_idx 
)

Definition at line 1482 of file wxlstate.cpp.

References wxlua_argerror(), wxlua_iswxluatype(), and WXLUA_TINTEGER.

wxLuaSmartwxArrayInt LUACALL wxlua_getwxArrayInt ( lua_State *  L,
int  stack_idx 
)
wxLuaSmartwxArrayString LUACALL wxlua_getwxArrayString ( lua_State *  L,
int  stack_idx 
)
wxEventType LUACALL wxlua_getwxeventtype ( lua_State *  L  ) 

Definition at line 1933 of file wxlstate.cpp.

References wxlua_lreg_wxeventtype_key.

Referenced by wxLuaState::GetInEventType(), and wxlua_debugHookFunction().

wxLuaStateData* LUACALL wxlua_getwxluastatedata ( lua_State *  L  ) 

Definition at line 1951 of file wxlstate.cpp.

References wxlua_lreg_wxluastatedata_key.

Referenced by wxlua_debugHookFunction().

wxLuaSmartwxSortedArrayString LUACALL wxlua_getwxSortedArrayString ( lua_State *  L,
int  stack_idx 
)
wxString* LUACALL wxlua_getwxStringarray ( lua_State *  L,
int  stack_idx,
int &  count 
)

Definition at line 1550 of file wxlstate.cpp.

References wxlua_getwxArrayString().

Referenced by wxLuaState::GetwxStringArray().

wxString LUACALL wxlua_getwxStringtype ( lua_State *  L,
int  stack_idx 
)
bool LUACALL wxlua_hasderivedmethod ( lua_State *  L,
void *  obj_ptr,
const char *  method_name,
bool  push_method 
)
int LUACALL wxlua_iswxluatype ( int  luatype,
int  wxl_type,
lua_State *  L 
)
bool wxlua_iswxstringtype ( lua_State *  L,
int  stack_idx 
)
void wxlua_lreg_createtable ( lua_State *  L,
void *  lightuserdata_reg_key,
int  narr,
int  nrec 
)
wxString wxlua_LUA_ERR_msg ( int  LUA_ERRx  ) 
wxString LUACALL wxlua_luaL_typename ( lua_State *  L,
int  stack_idx 
)
int wxlua_luatowxluatype ( int  luatype  ) 
int LUACALL wxlua_printFunction ( lua_State *  L  ) 

Definition at line 59 of file wxlstate.cpp.

References wxLuaState::GetId(), lua2wx(), wxLuaState::Ok(), and wxLuaState::SendEvent().

Referenced by wxLuaState::Create().

int wxlua_pushargs ( lua_State *  L,
wxChar **  argv,
int  argc,
int  start_n 
)

Definition at line 1761 of file wxlstate.cpp.

References wx2lua().

int LUACALL wxlua_pushwxArrayInttable ( lua_State *  L,
const wxArrayInt &  intArray 
)

Definition at line 1730 of file wxlstate.cpp.

Referenced by wxLuaObject::GetObject(), and wxLuaState::PushwxArrayIntTable().

int LUACALL wxlua_pushwxArrayStringtable ( lua_State *  L,
const wxArrayString &  strArray 
)
void LUACALL wxlua_pushwxString ( lua_State *  L,
const wxString &  str 
)
bool LUACALL wxlua_removederivedmethods ( lua_State *  L,
void *  obj_ptr 
)
void LUACALL wxlua_setcallbaseclassfunction ( lua_State *  L,
bool  call_base 
)
bool LUACALL wxlua_setderivedmethod ( lua_State *  L,
void *  obj_ptr,
const char *  method_name,
wxLuaObject wxlObj 
)
void LUACALL wxlua_setwxeventtype ( lua_State *  L,
wxEventType  evt_type 
)

Definition at line 1944 of file wxlstate.cpp.

References wxlua_lreg_wxeventtype_key.

Referenced by wxLuaState::Create(), and wxLuaState::SetInEventType().

void* LUACALL wxlua_touserdata ( lua_State *  L,
int  stack_idx,
bool  null_ptr 
)
static int LUACALL wxlua_traceback ( lua_State *  L  )  [static]

Definition at line 2670 of file wxlstate.cpp.

Referenced by wxLuaState::LuaPCall().

int wxlua_wxluatoluatype ( int  wxlarg  ) 
bool wxLuaCleanupWindows ( lua_State *  L,
bool  only_check 
)
void LUACALL wxluaO_addgcobject ( lua_State *  L,
void *  obj_ptr,
wxObject *  wxobj 
)

Definition at line 487 of file wxlstate.cpp.

References wxlua_lreg_gcobjects_key.

void LUACALL wxluaO_addgcobject ( lua_State *  L,
wxObject *  wxobj 
)
bool LUACALL wxluaO_deletegcobject ( lua_State *  L,
void *  udata,
void *  obj_ptr,
int  flags 
)
wxArrayString LUACALL wxluaO_getgcobjectinfo ( lua_State *  L  ) 
wxArrayString LUACALL wxluaO_gettrackedweakobjectinfo ( lua_State *  L  ) 

Definition at line 760 of file wxlstate.cpp.

References wxlua_lreg_weakobjects_key, and wxluaT_typename().

Referenced by wxLua_function_GetTrackedObjectInfo().

bool LUACALL wxluaO_isgcobject ( lua_State *  L,
void *  obj_ptr 
)
bool LUACALL wxluaO_istrackedweakobject ( lua_State *  L,
void *  obj_ptr,
int  wxl_type,
bool  push_on_stack 
)
void LUACALL wxluaO_trackweakobject ( lua_State *  L,
int  udata_stack_idx,
void *  obj_ptr,
int  wxl_type 
)

Definition at line 627 of file wxlstate.cpp.

References ABS_LUA_STKIDX, and wxlua_lreg_weakobjects_key.

Referenced by wxluaT_pushuserdatatype().

bool LUACALL wxluaO_undeletegcobject ( lua_State *  L,
void *  obj_ptr 
)

Definition at line 558 of file wxlstate.cpp.

References wxlua_lreg_gcobjects_key.

Referenced by wxLua_function_ungcobject().

int LUACALL wxluaO_untrackweakobject ( lua_State *  L,
void *  udata,
void *  obj_ptr 
)
bool LUACALL wxluaR_getref ( lua_State *  L,
int  ref_idx,
void *  lightuserdata_reg_key 
)
int LUACALL wxluaR_isrefed ( lua_State *  L,
int  stack_idx,
void *  lightuserdata_reg_key 
)

Definition at line 437 of file wxlstate.cpp.

References ABS_LUA_STKIDX, and wxlua_lreg_debug_refs_key.

Referenced by wxLua_function_isrefed().

int wxluaR_ref ( lua_State *  L,
int  stack_idx,
void *  lightuserdata_reg_key 
)
bool wxluaR_unref ( lua_State *  L,
int  ref_idx,
void *  lightuserdata_reg_key 
)
const wxLuaBindClass* LUACALL wxluaT_getclass ( lua_State *  L,
const char *  class_name 
)

Definition at line 1071 of file wxlstate.cpp.

References wxlua_lreg_classes_key.

const wxLuaBindClass* LUACALL wxluaT_getclass ( lua_State *  L,
int  wxl_type 
)
bool LUACALL wxluaT_getmetatable ( lua_State *  L,
int  wxl_type 
)
int LUACALL wxluaT_gettype ( lua_State *  L,
const char *  class_name 
)
wxString LUACALL wxluaT_gettypename ( lua_State *  L,
int  stack_idx 
)

Definition at line 1033 of file wxlstate.cpp.

References wxluaT_type(), and wxluaT_typename().

Referenced by wxlua_getLuaArgsMsg().

void* LUACALL wxluaT_getuserdatatype ( lua_State *  L,
int  stack_idx,
int  wxl_type 
)
int LUACALL wxluaT_isderivedclass ( const wxLuaBindClass wxlClass,
const wxLuaBindClass base_wxlClass 
)

Definition at line 1243 of file wxlstate.cpp.

References wxluaT_isderivedtype_recurser(), and wxLuaBindClass::wxluatype.

Referenced by wxlua_iswxluatype().

int LUACALL wxluaT_isderivedtype ( lua_State *  L,
int  wxl_type,
int  base_wxl_type 
)
static int wxluaT_isderivedtype_recurser ( const wxLuaBindClass wxlClass,
int  base_wxl_type,
int  levels 
) [static]
bool wxluaT_isuserdatatype ( lua_State *  L,
int  stack_idx,
int  wxl_type 
)
int wxluaT_newmetatable ( lua_State *  L,
int  wxl_type 
)
bool LUACALL wxluaT_pushuserdatatype ( lua_State *  L,
const void *  obj_ptr,
int  wxl_type,
bool  track,
bool  allow_NULL 
)
bool LUACALL wxluaT_setmetatable ( lua_State *  L,
int  wxl_type 
)

Definition at line 941 of file wxlstate.cpp.

References wxlua_error(), and wxluaT_getmetatable().

Referenced by wxLuaState::wxluaT_SetMetatable().

int LUACALL wxluaT_type ( lua_State *  L,
int  stack_idx 
)
wxString LUACALL wxluaT_typename ( lua_State *  L,
int  wxl_type 
)
void LUACALL wxluaW_addtrackedwindow ( lua_State *  L,
wxObject *  wxobj 
)

Definition at line 801 of file wxlstate.cpp.

References wxlua_lreg_topwindows_key, and wxluaW_istrackedwindow().

Referenced by wxLuaState::AddTrackedWindow().

wxArrayString LUACALL wxluaW_gettrackedwindowinfo ( lua_State *  L  ) 
bool LUACALL wxluaW_istrackedwindow ( lua_State *  L,
wxWindow *  win,
bool  check_parents 
)

Definition at line 839 of file wxlstate.cpp.

References wxlua_lreg_topwindows_key.

Referenced by wxLuaState::IsTrackedWindow(), and wxluaW_addtrackedwindow().

void LUACALL wxluaW_removetrackedwindow ( lua_State *  L,
wxWindow *  win 
)

Definition at line 827 of file wxlstate.cpp.

References wxlua_lreg_topwindows_key.

Referenced by wxLuaState::RemoveTrackedWindow().


Variable Documentation

struct luaL_reg bitlib[] [static]
Initial value:
 {
  {"cast",    bit_cast},
  {"bnot",    bit_bnot},
  {"band",    bit_band},
  {"bor",     bit_bor},
  {"bxor",    bit_bxor},
  {"lshift",  bit_lshift},
  {"rshift",  bit_rshift},
  {"arshift", bit_arshift},

  {NULL, NULL}
}

Definition at line 4221 of file wxlstate.cpp.

Referenced by luaopen_bit().

const char* wxlua_lreg_callbaseclassfunc_key = "wxLua CallBaseClassFunc"
const char* wxlua_lreg_classes_key = "wxLuaBindClass structs"
const char* wxlua_lreg_debug_refs_key = "wxLuaDebugData refs"
const char* wxlua_lreg_derivedmethods_key = "wxLua derived class methods"
const char* wxlua_lreg_evtcallbacks_key = "wxLuaEventCallbacks"
const char* wxlua_lreg_gcobjects_key = "wxLua gc objects to delete"
const char* wxlua_lreg_refs_key = "wxLua Lua object refs"
const char* wxlua_lreg_regtable_key = "wxLua LUA_REGISTRYINDEX tables"
const char* wxlua_lreg_topwindows_key = "wxLua top level wxWindows"
const char* wxlua_lreg_types_key = "wxLua metatable class types"
const char* wxlua_lreg_weakobjects_key = "wxLua objects pushed"
const char* wxlua_lreg_windestroycallbacks_key = "wxLuaWinDestoyCallbacks"
const char* wxlua_lreg_wxeventtype_key = "wxLua wxEventType"
const char* wxlua_lreg_wxluabindings_key = "wxLuaBindings"
const char* wxlua_lreg_wxluastate_key = "wxLuaState"
const char* wxlua_lreg_wxluastatedata_key = "wxLuaStateData"
const char* wxlua_metatable_type_key = "wxLua metatable class type"
const char* wxlua_metatable_wxluabindclass_key = "wxLua metatable wxLuaBindClass"
Generated on Tue Jul 13 10:30:39 2010 for wxLua by  doxygen 1.6.3