gambas-source-code/main/gbx/gbx_library.h

78 lines
2 KiB
C
Raw Normal View History

/***************************************************************************
gbx_library.h
(c) 2000-2013 Benoît Minisini <gambas@users.sourceforge.net>
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 2, 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 __GBX_LIBRARY_H
#define __GBX_LIBRARY_H
#include "gambas.h"
#include "gb_list.h"
#include "gb_component.h"
#include <dlfcn.h>
#ifndef DONT_USE_LTDL
#include <ltdl.h>
#else
#define lt_dlsym dlsym
#define lt_dlclose dlclose
#define lt_dlerror dlerror
#endif
typedef
struct _LIBRARY {
#ifdef USE_LTDL
lt_dlhandle handle;
#else
void *handle;
#endif
const char *name;
void (*signal)();
int (*info)();
unsigned persistent : 1;
unsigned _reserved: 13;
}
LIBRARY;
#ifndef __GBX_LIBRARY_C
#endif
******** Merged /branches/64bits r918:1003 into /trunk [CONFIGURATION] * NEW: 64 bits port. [EXAMPLES] * BUG: Fixed the AnalogWatch example. [WIKI CGI SCRIPT] * NEW: Some little cosmetic changes. [INTERPRETER] * NEW: The extern function implementation has been redesigned and is now based on libffi, so that it works on 64 bits system. Because of a flaw in the compiler design, projects that use the Pointer datatype must be recompiled to be used on a 64 bits system. This flaw will be fixed in Gambas 3. * OPT: Put some tables into read-only memory. About 1000 bytes are saved for each running interpreter, except the first one. * BUG: Does not crash anymore if a component cannot be loaded. * NEW: Spanish translation updated. * NEW: A new interpreter API for returning a pointer. [COMPILER] * BUG: Correctly compiles LONG constants inside code. [GB.DEBUG] * BUG: Compiles and links the gb.debug components with the thread libraries. [GB.DB.SQLITE3] * BUG: Getting the primary index of a table without primary index is safe now. [GB.GTK] * BUG: Modified the GLib priority of watched descriptors, as the main loop could enter in a loop in which user interface events were not managed. * BUG: Message boxes use application title without crashing now. [GB.OPENGL] * BUG: Disable dead code. [GB.QT.EXT] * BUG: TextEdit.TextWidth and TextEdit.TextHeight were not declared as read-only properties. [GB.XML.XSLT] * BUG: XSLT class is now declared as being not creatable. git-svn-id: svn://localhost/gambas/trunk@1006 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-17 22:39:26 +01:00
void LIBRARY_init(void);
void LIBRARY_exit(void);
******** Merged /branches/64bits r918:1003 into /trunk [CONFIGURATION] * NEW: 64 bits port. [EXAMPLES] * BUG: Fixed the AnalogWatch example. [WIKI CGI SCRIPT] * NEW: Some little cosmetic changes. [INTERPRETER] * NEW: The extern function implementation has been redesigned and is now based on libffi, so that it works on 64 bits system. Because of a flaw in the compiler design, projects that use the Pointer datatype must be recompiled to be used on a 64 bits system. This flaw will be fixed in Gambas 3. * OPT: Put some tables into read-only memory. About 1000 bytes are saved for each running interpreter, except the first one. * BUG: Does not crash anymore if a component cannot be loaded. * NEW: Spanish translation updated. * NEW: A new interpreter API for returning a pointer. [COMPILER] * BUG: Correctly compiles LONG constants inside code. [GB.DEBUG] * BUG: Compiles and links the gb.debug components with the thread libraries. [GB.DB.SQLITE3] * BUG: Getting the primary index of a table without primary index is safe now. [GB.GTK] * BUG: Modified the GLib priority of watched descriptors, as the main loop could enter in a loop in which user interface events were not managed. * BUG: Message boxes use application title without crashing now. [GB.OPENGL] * BUG: Disable dead code. [GB.QT.EXT] * BUG: TextEdit.TextWidth and TextEdit.TextHeight were not declared as read-only properties. [GB.XML.XSLT] * BUG: XSLT class is now declared as being not creatable. git-svn-id: svn://localhost/gambas/trunk@1006 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-17 22:39:26 +01:00
LIBRARY *LIBRARY_create(const char *path);
void LIBRARY_delete(LIBRARY *lib);
int LIBRARY_load(LIBRARY *lib);
******** Merged /branches/64bits r918:1003 into /trunk [CONFIGURATION] * NEW: 64 bits port. [EXAMPLES] * BUG: Fixed the AnalogWatch example. [WIKI CGI SCRIPT] * NEW: Some little cosmetic changes. [INTERPRETER] * NEW: The extern function implementation has been redesigned and is now based on libffi, so that it works on 64 bits system. Because of a flaw in the compiler design, projects that use the Pointer datatype must be recompiled to be used on a 64 bits system. This flaw will be fixed in Gambas 3. * OPT: Put some tables into read-only memory. About 1000 bytes are saved for each running interpreter, except the first one. * BUG: Does not crash anymore if a component cannot be loaded. * NEW: Spanish translation updated. * NEW: A new interpreter API for returning a pointer. [COMPILER] * BUG: Correctly compiles LONG constants inside code. [GB.DEBUG] * BUG: Compiles and links the gb.debug components with the thread libraries. [GB.DB.SQLITE3] * BUG: Getting the primary index of a table without primary index is safe now. [GB.GTK] * BUG: Modified the GLib priority of watched descriptors, as the main loop could enter in a loop in which user interface events were not managed. * BUG: Message boxes use application title without crashing now. [GB.OPENGL] * BUG: Disable dead code. [GB.QT.EXT] * BUG: TextEdit.TextWidth and TextEdit.TextHeight were not declared as read-only properties. [GB.XML.XSLT] * BUG: XSLT class is now declared as being not creatable. git-svn-id: svn://localhost/gambas/trunk@1006 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-17 22:39:26 +01:00
void LIBRARY_unload(LIBRARY *lib);
******** Merged /branches/64bits r918:1003 into /trunk [CONFIGURATION] * NEW: 64 bits port. [EXAMPLES] * BUG: Fixed the AnalogWatch example. [WIKI CGI SCRIPT] * NEW: Some little cosmetic changes. [INTERPRETER] * NEW: The extern function implementation has been redesigned and is now based on libffi, so that it works on 64 bits system. Because of a flaw in the compiler design, projects that use the Pointer datatype must be recompiled to be used on a 64 bits system. This flaw will be fixed in Gambas 3. * OPT: Put some tables into read-only memory. About 1000 bytes are saved for each running interpreter, except the first one. * BUG: Does not crash anymore if a component cannot be loaded. * NEW: Spanish translation updated. * NEW: A new interpreter API for returning a pointer. [COMPILER] * BUG: Correctly compiles LONG constants inside code. [GB.DEBUG] * BUG: Compiles and links the gb.debug components with the thread libraries. [GB.DB.SQLITE3] * BUG: Getting the primary index of a table without primary index is safe now. [GB.GTK] * BUG: Modified the GLib priority of watched descriptors, as the main loop could enter in a loop in which user interface events were not managed. * BUG: Message boxes use application title without crashing now. [GB.OPENGL] * BUG: Disable dead code. [GB.QT.EXT] * BUG: TextEdit.TextWidth and TextEdit.TextHeight were not declared as read-only properties. [GB.XML.XSLT] * BUG: XSLT class is now declared as being not creatable. git-svn-id: svn://localhost/gambas/trunk@1006 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-17 22:39:26 +01:00
void LIBRARY_declare(GB_DESC **desc);
[INTERPRETER] * NEW: Add a new GB.Component.Declare() API, that allows a component to dynamically register a class description. [INFORMER] * NEW: A component now can declare classes through a GB_OPTIONAL_CLASSES public symbol. Theses classes are included into the information file, but are not automatically loaded as the ones defined through the GB_CLASSES symbol. [GB.FORM.STATUSICON] * NEW: This component has been removed and replaced by gb.dbus.trayicon. * NEW: This component now provide TrayIcon and TrayIcons classes that have exactly the same interface as the old ones. [GB.DBUS] * NEW: Remove the now useless DBusConnection.Raise(). The DBusConnection Register() and Unregister() are kept for backward-compatibility reason. * NEW: Add DBus.Raise() and DBus[].Raise() to raise signals. At the moment, there is no difference between the two methods, as there no mean to indicate the sender raising a signal. I don't know yet how DBus decides which service sends a signal! [GB.DBUS.TRAYICON] * NEW: This component implements the tray icon DBus protocol. It is automatically loaded by the GUI components. [GB.GTK] * NEW: Load the 'gb.dbus' and 'gb.dbus.trayicon' components if the current desktop is KDE >= 4. Otherwise, use the old TrayIcon implementation. * BUG: Fix the old TrayIcon implementation, so that it matches the QT one. [GB.GTK3] * NEW: Load the 'gb.dbus' and 'gb.dbus.trayicon' components if the current desktop is KDE >= 4. Otherwise, use the old TrayIcon implementation. * BUG: Fix the component name in deprecation warning messages. * BUG: Fix the old TrayIcon implementation, so that it matches the QT one. [GB.QT4] * NEW: Load the 'gb.dbus' and 'gb.dbus.trayicon' components if the current desktop is KDE >= 4. Otherwise, use the old TrayIcon implementation. [GB.QT5] * NEW: Load the 'gb.dbus' and 'gb.dbus.trayicon' components if the current desktop is KDE >= 4. Otherwise, use the old TrayIcon implementation. git-svn-id: svn://localhost/gambas/trunk@7154 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-06-29 03:46:51 +02:00
void LIBRARY_declare_one(GB_DESC *desc);
bool LIBRARY_get_interface_by_name(const char *name, int version, void *iface);
******** Merged /branches/64bits r918:1003 into /trunk [CONFIGURATION] * NEW: 64 bits port. [EXAMPLES] * BUG: Fixed the AnalogWatch example. [WIKI CGI SCRIPT] * NEW: Some little cosmetic changes. [INTERPRETER] * NEW: The extern function implementation has been redesigned and is now based on libffi, so that it works on 64 bits system. Because of a flaw in the compiler design, projects that use the Pointer datatype must be recompiled to be used on a 64 bits system. This flaw will be fixed in Gambas 3. * OPT: Put some tables into read-only memory. About 1000 bytes are saved for each running interpreter, except the first one. * BUG: Does not crash anymore if a component cannot be loaded. * NEW: Spanish translation updated. * NEW: A new interpreter API for returning a pointer. [COMPILER] * BUG: Correctly compiles LONG constants inside code. [GB.DEBUG] * BUG: Compiles and links the gb.debug components with the thread libraries. [GB.DB.SQLITE3] * BUG: Getting the primary index of a table without primary index is safe now. [GB.GTK] * BUG: Modified the GLib priority of watched descriptors, as the main loop could enter in a loop in which user interface events were not managed. * BUG: Message boxes use application title without crashing now. [GB.OPENGL] * BUG: Disable dead code. [GB.QT.EXT] * BUG: TextEdit.TextWidth and TextEdit.TextHeight were not declared as read-only properties. [GB.XML.XSLT] * BUG: XSLT class is now declared as being not creatable. git-svn-id: svn://localhost/gambas/trunk@1006 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-01-17 22:39:26 +01:00
void LIBRARY_get_interface(LIBRARY *lib, int version, void *iface);
void LIBRARY_exec(LIBRARY *lib, int argc, char **argv);
[INTERPRETER] * NEW: GB.GetReturnValue() is a new interpreter API that returns a pointer to the internal GB_VALUE slot where GB.ReturnXXX() functions store the return value. * NEW: Allow a component to declare a GB_AFTER_INIT() exported method that is called just after all the components declared in the project are completely loaded. [GB.DBUS] * NEW: DBus._HasSystemTray() is a new method that returns if the DBus system tray is present. That method is used by the 'gb.gui.trayicon' component to know if 'gb.dbus.trayicon' must be loaded. * BUG: Fix xml introspection analysis. [GB.DBUS.TRAYICON] * BUG: Remove debugging messages. * BUG: TrayIcon icon data is sent correctly now. [GB.GUI.TRAYICON] * NEW: New component that you must check if you want to have system tray icons. It loads 'gb.dbus', use DBus._HasSystemTray() to know if it can load 'gb.dbus.trayicon'. Otherwise it tells the current GUI component to declare the old system tray implementation classes. [GB.GTK] * NEW: Let the new 'gb.gui.trayicon' deals with the dbus stuff, but keep the old system tray icon and use them on demand. [GB.GTK3] * NEW: Let the new 'gb.gui.trayicon' deals with the dbus stuff, but keep the old system tray icon and use them on demand. [GB.QT4] * NEW: Let the new 'gb.gui.trayicon' deals with the dbus stuff, but keep the old system tray icon and use them on demand. [GB.QT5] * NEW: Let the new 'gb.gui.trayicon' deals with the dbus stuff, but keep the old system tray icon and use them on demand. git-svn-id: svn://localhost/gambas/trunk@7170 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-07-04 00:18:58 +02:00
void LIBRARY_after_init(LIBRARY *lib);
#endif