// static void SetScreenType( wxSystemScreenType screen ); static int LUACALL wxLua_wxSystemSettings_SetScreenType(lua_State *L) { // wxSystemScreenType screen wxSystemScreenType screen = (wxSystemScreenType)wxlua_getenumtype(L, 1); // call SetScreenType wxSystemSettings::SetScreenType(screen); return 0; }
// static bool HasFeature(wxSystemFeature index ); static int LUACALL wxLua_wxSystemSettings_HasFeature(lua_State *L) { // wxSystemFeature index wxSystemFeature index = (wxSystemFeature)wxlua_getenumtype(L, 1); // call HasFeature bool returns = (wxSystemSettings::HasFeature(index)); // push the result flag lua_pushboolean(L, returns); return 1; }
// static wxLuaBindCFunc s_wxluafunc_wxLua_wxMemoryFSHandler_AddFile1[1] = {{ wxLua_wxMemoryFSHandler_AddFile1, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 3, 3, s_wxluatypeArray_wxLua_wxMemoryFSHandler_AddFile1 }}; // static void AddFile(const wxString& filename, const wxImage& image, wxBitmapType type); static int LUACALL wxLua_wxMemoryFSHandler_AddFile1(lua_State *L) { // wxBitmapType type wxBitmapType type = (wxBitmapType)wxlua_getenumtype(L, 3); // const wxImage image const wxImage * image = (const wxImage *)wxluaT_getuserdatatype(L, 2, wxluatype_wxImage); // const wxString filename const wxString filename = wxlua_getwxStringtype(L, 1); // call AddFile wxMemoryFSHandler::AddFile(filename, *image, type); return 0; }
// wxString get_romcode_name(ROMLOADER_ROMCODE tRomcode) static int LUACALL wxLua_romloader_get_romcode_name(lua_State *L) { // ROMLOADER_ROMCODE tRomcode ROMLOADER_ROMCODE tRomcode = (ROMLOADER_ROMCODE)wxlua_getenumtype(L, 2); // get this romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader); // call get_romcode_name wxString returns = (self->get_romcode_name(tRomcode)); // push the result string wxlua_pushwxString(L, returns); return 1; }
// wxString get_chiptyp_name(ROMLOADER_CHIPTYP tChiptyp) static int LUACALL wxLua_romloader_get_chiptyp_name(lua_State *L) { // ROMLOADER_CHIPTYP tChiptyp ROMLOADER_CHIPTYP tChiptyp = (ROMLOADER_CHIPTYP)wxlua_getenumtype(L, 2); // get this romloader * self = (romloader *)wxluaT_getuserdatatype(L, 1, wxluatype_romloader); // call get_chiptyp_name wxString returns = (self->get_chiptyp_name(tChiptyp)); // push the result string wxlua_pushwxString(L, returns); return 1; }
// static wxFont GetFont(wxSystemFont index ); static int LUACALL wxLua_wxSystemSettings_GetFont(lua_State *L) { // wxSystemFont index wxSystemFont index = (wxSystemFont)wxlua_getenumtype(L, 1); // call GetFont // allocate a new object using the copy constructor wxFont* returns = new wxFont(wxSystemSettings::GetFont(index)); // add the new object to the tracked memory list wxluaO_addgcobject(L, returns, wxluatype_wxFont); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); return 1; }
// static int GetMetric(wxSystemMetric index, wxWindow* win = NULL ); static int LUACALL wxLua_wxSystemSettings_GetMetric(lua_State *L) { // get number of arguments int argCount = lua_gettop(L); // wxWindow win = NULL wxWindow * win = (argCount >= 2 ? (wxWindow *)wxluaT_getuserdatatype(L, 2, wxluatype_wxWindow) : NULL); // wxSystemMetric index wxSystemMetric index = (wxSystemMetric)wxlua_getenumtype(L, 1); // call GetMetric int returns = (wxSystemSettings::GetMetric(index, win)); // push the result number lua_pushnumber(L, returns); return 1; }
// bool ShowPlayerControls(wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT) static int LUACALL wxLua_wxMediaCtrl_ShowPlayerControls(lua_State *L) { // get number of arguments int argCount = lua_gettop(L); // wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT wxMediaCtrlPlayerControls flags = (argCount >= 2 ? (wxMediaCtrlPlayerControls)wxlua_getenumtype(L, 2) : wxMEDIACTRLPLAYERCONTROLS_DEFAULT); // get this wxMediaCtrl * self = (wxMediaCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMediaCtrl); // call ShowPlayerControls bool returns = (self->ShowPlayerControls(flags)); // push the result flag lua_pushboolean(L, returns); return 1; }
// static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM, int flags = wxKILL_NOCHILDREN) static int LUACALL wxLua_wxProcess_Kill(lua_State *L) { // get number of arguments int argCount = lua_gettop(L); // int flags = wxKILL_NOCHILDREN int flags = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : wxKILL_NOCHILDREN); // wxSignal sig = wxSIGTERM wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getenumtype(L, 2) : wxSIGTERM); // int pid int pid = (int)wxlua_getnumbertype(L, 1); // call Kill wxKillError returns = (wxProcess::Kill(pid, sig, flags)); // push the result number lua_pushnumber(L, returns); return 1; }
// wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart) static int LUACALL wxLua_wxMediaCtrl_Seek(lua_State *L) { // get number of arguments int argCount = lua_gettop(L); // wxSeekMode mode = wxFromStart wxSeekMode mode = (argCount >= 3 ? (wxSeekMode)wxlua_getenumtype(L, 3) : wxFromStart); // wxFileOffset where wxFileOffset where = (wxFileOffset)wxlua_getuintegertype(L, 2); // get this wxMediaCtrl * self = (wxMediaCtrl *)wxluaT_getuserdatatype(L, 1, wxluatype_wxMediaCtrl); // call Seek wxFileOffset returns = (self->Seek(where, mode)); // push the result number lua_pushnumber(L, returns); return 1; }