31f0d78532
* NEW: Theme configuration was redesigned and enhanced. * NEW: New option for setting the tabstrip title font size. * NEW: The file information dialog was redesigned again. * NEW: Some option names were changed. * NEW: A new "Project" virtual folder in the project treeview. It is exactly like the "Data" folder, except that the files and directories stored inside are not included in the generated executable. * NEW: As keywords are now displayed in lowercase by default, there is a new option for displaying them in uppercase as before. [INTERPRETER] * NEW: Object.GetProperty() can return the value of a constant. * NEW: Keywords are in lowercase by default, the first letter of the words staying in uppercase. [GB.EVAL] * NEW: The Highlight.Analyze() method always return keywords in uppercase, so that you can continue to easily do non case-sensitive comparisons. [GB.QT] * BUG: Changing the font of a TabStrip correctly refreshes its layout now. [GB.QT.EXT] * NEW: The Editor can force highlighted keywords to uppercase. It is only done when drawing the keyword. The internal text is not changed. git-svn-id: svn://localhost/gambas/trunk@1265 867c0c6c-44f3-4631-809d-bfa615b0a4ec
82 lines
1.9 KiB
C
82 lines
1.9 KiB
C
/***************************************************************************
|
|
|
|
CSystem.c
|
|
|
|
(c) 2000-2007 Benoit Minisini <gambas@freesurf.fr>
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 1, or (at your option)
|
|
any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
***************************************************************************/
|
|
|
|
#define __CSYSTEM_C
|
|
|
|
#include "gambas.h"
|
|
#include "gb_common.h"
|
|
#include "gb_reserved.h"
|
|
#include "CSystem.h"
|
|
|
|
static GB_ARRAY _keywords = 0;
|
|
|
|
BEGIN_PROPERTY(CSYSTEM_keywords)
|
|
|
|
COMP_INFO *info;
|
|
SUBR_INFO *subr;
|
|
char *str;
|
|
int i;
|
|
|
|
if (!_keywords)
|
|
{
|
|
GB.Array.New(&_keywords, GB_T_STRING, 0);
|
|
|
|
for (info = &COMP_res_info[1]; info->name; info++)
|
|
{
|
|
if (*info->name >= 'A' && *info->name <= 'Z')
|
|
{
|
|
GB.NewString(&str, info->name, 0);
|
|
*((char **)GB.Array.Add(_keywords)) = str;
|
|
}
|
|
}
|
|
|
|
for (subr = &COMP_subr_info[0]; subr->name; subr++)
|
|
{
|
|
GB.NewString(&str, subr->name, 0);
|
|
*((char **)GB.Array.Add(_keywords)) = str;
|
|
}
|
|
|
|
GB.Ref(_keywords);
|
|
}
|
|
|
|
GB.ReturnObject(_keywords);
|
|
|
|
END_PROPERTY
|
|
|
|
BEGIN_METHOD_VOID(CSYSTEM_exit)
|
|
|
|
GB.Unref((void **)&_keywords);
|
|
|
|
END_METHOD
|
|
|
|
|
|
GB_DESC CSystemDesc[] =
|
|
{
|
|
GB_DECLARE("System", 0),
|
|
|
|
GB_STATIC_METHOD("_exit", NULL, CSYSTEM_exit, NULL),
|
|
|
|
GB_STATIC_PROPERTY_READ("Keywords", "String[]", CSYSTEM_keywords),
|
|
|
|
GB_END_DECLARE
|
|
};
|
|
|