Commit d99b88d4 authored by Benoît Minisini's avatar Benoît Minisini

[GB.GSL]

* NEW: Skeleton for a new component based on the GNU Scientific Library. It
  will be developed by Randall Morgan.


git-svn-id: svn://localhost/gambas/trunk@4428 867c0c6c-44f3-4631-809d-bfa615b0a4ec
parent 0a9b6abe
/* Copyrights */
#define __COPYRIGHT (c) 2012
#define __AUTHOR Randall Morgan
#define __EMAIL <rmorgan62@gmail.com>
/* Name of the component */
#define __COMPONENT gb.gsl
/* Name of the component with points replaced by underscore */
#define __COMPONENT_UNDERSCORE gb_gsl
/* Short name of the component */
#define __NAME gsl
/* Short name of the component in uppercase */
#define __UNAME GSL
/* Description of the component */
#define __DESCRIPTION GNU Scientific Library component
/* If the component detection uses pkg-config */
#define __USE_PKGCONFIG 1
#if __USE_PKGCONFIG
/* Name of the package for pkg-config */
#define __PKGCONFIG_NAME gsl
/* Minimum version needed */
#define __PKGCONFIG_VERSION
#else /* __USE_PKGCONFIG */
/* If your component uses C */
#define __USE_C 1
/* If your component uses C++ */
#define __USE_CPLUSPLUS 1
/* If your component uses multi-threading */
#define __USE_THREAD 0
/* If your component uses X-Window */
#define __USE_XWINDOW 0
/* Includes to search for */
#define __SEARCH_INCLUDE
/* Includes directories search path */
#define __SEARCH_INCLUDE_PATH /usr/local/lib /usr/local /usr/lib /usr
/* Includes sub-directories search */
#define __SEARCH_INCLUDE_DIR /usr/local/include gsl/include include gsl*/include gsl/*/include
/* Libraries to search for */
#define __SEARCH_LIBRARY libgsl.$SHLIBEXT
/* Libraries directories search path */
#define __SEARCH_LIBRARY_PATH /usr/local /usr
/* Libraries sub-directories search path */
#define __SEARCH_LIBRARY_DIR local/lib lib
/* Libraries to link with */
#define __LIBRARY libgsl
/* Includes to link with */
#define __INCLUDE libgsl
#endif /* __USE_PKGCONFIG */
/* Source file list */
#define __SOURCES main.c main.h c_gsl.c c_gsl.h
/* Main C/C++ source basename in uppercase */
#define __MAIN_UNAME MAIN
../component.am
\ No newline at end of file
COMPONENT = gb.gsl
include $(top_srcdir)/component.am
INCLUDES = @GSL_INC@
gblib_LTLIBRARIES = gb.gsl.la
gb_gsl_la_LIBADD = @GSL_LIB@
gb_gsl_la_LDFLAGS = -module @LD_FLAGS@ @GSL_LDFLAGS@
gb_gsl_la_SOURCES = main.c main.h c_gsl.c c_gsl.h
/***************************************************************************
gsl.c
gb.gsl component
(c) 2012 Randall Morgan <rmorgan62@gmail.com>
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., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
***************************************************************************/
#ifndef __C_GSL_C
#define __C_GSL_C
#include "gambas.h"
#include "gb_common.h"
#include "c_gsl.h"
//#include "/usr/local/include/gsl/gsl_math.h"
#include <gsl/gsl_sf.h>
#endif
/*-----------------------------------------------
Small Integer Power Functions
-----------------------------------------------*/
BEGIN_METHOD(GSL_INTPOW2, GB_INTEGER x;)
// Return x^2 using a small int safe method
// call gsl native function double gsl_pow_2(int x)
GB.ReturnFloat(gsl_pow_2(VARG(x)));
END_METHOD
/**************************************************
Describe Class properties and methods to Gambas
**************************************************/
GB_DESC CGslDesc[] =
{
GB_DECLARE("GSL",0), GB_NOT_CREATABLE(),
GB_METHOD("IntPow", "f", GSL_INTPOW2, "(x)f"),
GB_END_DECLARE
};
/***************************************************************************
c_gsl.h
gb.gsl component
(c) 2012 Randall Morgan <rmorgan62@gmail.com>
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., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
***************************************************************************/
#ifndef __C_GSL_H
#define __C_GSL_H
#include "gambas.h"
GB_INTERFACE GB EXPORT;
extern GB_DESC CGslDesc[];
//extern GSL_INTPOW2;
#endif /* __C_GSL_H */
[Component]
Key=__COMPONENT
Name=__DESCRIPTION
Author=
Alpha=1
/***************************************************************************
main.c
gb.gsl component
(c) 2012 Randall Morgan <rmorgan62@gmail.com>
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., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
***************************************************************************/
#define __MAIN_C
#include "main.h"
#include "c_gsl.h"
#include "gambas.h"
#include "gb_common.h"
#ifdef __cplusplus
extern "C" {
#endif
GB_INTERFACE GB EXPORT;
GB_DESC *GB_CLASSES[] EXPORT =
{
CGslDesc,
NULL
};
int EXPORT GB_INIT(void)
{
//CLASS_GSL = GB.FindClass("CGsl");
return 0;
}
void EXPORT GB_EXIT()
{
}
#ifdef _cpluscplus
}
#endif
/***************************************************************************
main.h
gb.gsl component
(c) 2012 Randall Morgan <rmorgan62@gmail.com>
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., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
***************************************************************************/
#ifndef __MAIN_H
#define __MAIN_H
#include "gambas.h"
#include "c_gsl.h"
#ifndef __MAIN_C
extern GB_CLASS CGslDesc[];
#endif
#endif /* __MAIN_H */
......@@ -191,7 +191,7 @@ GEditor::GEditor(QWidget *parent)
updateFont();
blinkTimer = new QTimer(this);
//connect(blinkTimer, SIGNAL(timeout()), this, SLOT(blinkTimerTimeout()));
connect(blinkTimer, SIGNAL(timeout()), this, SLOT(blinkTimerTimeout()));
//startBlink();
scrollTimer = new QTimer(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment