#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <elf.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <dirent.h>
#include <pthread.h>
#include "vcell.h"
#include "vcell_prop.h"
Functions | |
int | liqcell_classfactory_so_free (vcell *self) |
vcell * | liqcell_classfactory_so_init (char *filename) |
vcell * | liqcell_classfactory_create_binding (vcell *self) |
vcell * | liqcell_classfactory_so_call_create (vcell *self) |
vcell * | liqcell_classfactory_masterinit (char *widgetpath) |
Copyright (C) 2008 Gary Birkett
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
vcell* liqcell_classfactory_create_binding | ( | vcell * | self | ) |
Takes the previously opened dynamic library and bind the main widget function. It is expected that the "main" function of the widget be named in the form <filetitlenoext>_create. This gets the widget function of that form so that it can be executed.
self | The widget's vcell |
vcell* liqcell_classfactory_masterinit | ( | char * | widgetpath | ) |
Load all of the widgets. Open the widgetpath directory and stat each file checking for integrity. Make sure the file is a .so file and then create a vcell and insert it into the parent widgets vcell. The parent widgets vcell has many children.
widgetpath | The directory path to the widgets |
vcell* liqcell_classfactory_so_call_create | ( | vcell * | self | ) |
Execute the "constructor" for the provided widget vcell. This runs the code of the widget stored in the .so file.
self | The widget's vcell |
int liqcell_classfactory_so_free | ( | vcell * | self | ) |
Shutdown a widget by closing the dynamic library.
self | The widget's vcell to close |
vcell* liqcell_classfactory_so_init | ( | char * | filename | ) |
For each widget, use dlopen() to open the library for the widget, create the initial empty vcell and store the dl handler in the vcell's .tag. Do not bind the init function yet though!
filename | File name of the widget to initiate |