From 58577a9c0a61c3e7860d0651ffdb2d58c0585264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 2 Jan 2010 02:01:34 +0000 Subject: [PATCH] [CONFIGURATION] * NEW: Remove the gb.gtk.svg component. git-svn-id: svn://localhost/gambas/trunk@2589 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- Makefile.am | 2 +- configure.ac | 1 - gb.gtk.svg/AUTHORS | 0 gb.gtk.svg/COPYING | 1 - gb.gtk.svg/ChangeLog | 241 ---------------------------- gb.gtk.svg/INSTALL | 1 - gb.gtk.svg/Makefile.am | 3 - gb.gtk.svg/NEWS | 0 gb.gtk.svg/README | 3 - gb.gtk.svg/acinclude.m4 | 1 - gb.gtk.svg/component.am | 1 - gb.gtk.svg/configure.ac | 29 ---- gb.gtk.svg/depcomp | 1 - gb.gtk.svg/gambas.h | 1 - gb.gtk.svg/gb.image.h | 1 - gb.gtk.svg/gb_common.h | 1 - gb.gtk.svg/ltmain.sh | 1 - gb.gtk.svg/m4 | 1 - gb.gtk.svg/missing | 1 - gb.gtk.svg/reconf | 1 - gb.gtk.svg/src/CSVG.c | 235 --------------------------- gb.gtk.svg/src/CSVG.h | 47 ------ gb.gtk.svg/src/Makefile.am | 16 -- gb.gtk.svg/src/gb.gtk.svg.component | 9 -- gb.gtk.svg/src/main.c | 65 -------- gb.gtk.svg/src/main.h | 35 ---- gb.gtk.svg/stamp-h1 | 1 - 27 files changed, 1 insertion(+), 698 deletions(-) delete mode 100644 gb.gtk.svg/AUTHORS delete mode 120000 gb.gtk.svg/COPYING delete mode 100644 gb.gtk.svg/ChangeLog delete mode 120000 gb.gtk.svg/INSTALL delete mode 100644 gb.gtk.svg/Makefile.am delete mode 100644 gb.gtk.svg/NEWS delete mode 100644 gb.gtk.svg/README delete mode 120000 gb.gtk.svg/acinclude.m4 delete mode 120000 gb.gtk.svg/component.am delete mode 100644 gb.gtk.svg/configure.ac delete mode 120000 gb.gtk.svg/depcomp delete mode 120000 gb.gtk.svg/gambas.h delete mode 120000 gb.gtk.svg/gb.image.h delete mode 120000 gb.gtk.svg/gb_common.h delete mode 120000 gb.gtk.svg/ltmain.sh delete mode 120000 gb.gtk.svg/m4 delete mode 120000 gb.gtk.svg/missing delete mode 120000 gb.gtk.svg/reconf delete mode 100644 gb.gtk.svg/src/CSVG.c delete mode 100644 gb.gtk.svg/src/CSVG.h delete mode 100644 gb.gtk.svg/src/Makefile.am delete mode 100644 gb.gtk.svg/src/gb.gtk.svg.component delete mode 100644 gb.gtk.svg/src/main.c delete mode 100644 gb.gtk.svg/src/main.h delete mode 100644 gb.gtk.svg/stamp-h1 diff --git a/Makefile.am b/Makefile.am index c940b5ea5..f00b70e42 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = main @bzlib2_dir@ @zlib_dir@ @mysql_dir@ @odbc_dir@ @postgresql_dir@ @sqlite3_dir@ @sqlite2_dir@ @firebird_dir@ @gtk_dir@ @net_dir@ @curl_dir@ @smtp_dir@ @pcre_dir@ @qt_dir@ @sdl_dir@ @sdlsound_dir@ @xml_dir@ @v4l_dir@ @crypt_dir@ @opengl_dir@ @corba_dir@ @pdf_dir@ @gtksvg_dir@ @desktop_dir@ @qt4_dir@ @cairo_dir@ @imageio_dir@ @imageimlib_dir@ comp app examples +SUBDIRS = main @bzlib2_dir@ @zlib_dir@ @mysql_dir@ @odbc_dir@ @postgresql_dir@ @sqlite3_dir@ @sqlite2_dir@ @firebird_dir@ @gtk_dir@ @net_dir@ @curl_dir@ @smtp_dir@ @pcre_dir@ @qt_dir@ @sdl_dir@ @sdlsound_dir@ @xml_dir@ @v4l_dir@ @crypt_dir@ @opengl_dir@ @corba_dir@ @pdf_dir@ @desktop_dir@ @qt4_dir@ @cairo_dir@ @imageio_dir@ @imageimlib_dir@ comp app examples EXTRA_DIST = component.am README README.*[^~] TODO TEMPLATE reconf reconf-all diff --git a/configure.ac b/configure.ac index fb11a71d2..263b51fa3 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,6 @@ GB_CONFIG_SUBDIRS(sqlite2, gb.db.sqlite2) GB_CONFIG_SUBDIRS(sqlite3, gb.db.sqlite3) GB_CONFIG_SUBDIRS(firebird, gb.db.firebird) GB_CONFIG_SUBDIRS(gtk, gb.gtk) -GB_CONFIG_SUBDIRS(gtksvg, gb.gtk.svg) GB_CONFIG_SUBDIRS(pdf, gb.pdf) GB_CONFIG_SUBDIRS(net, gb.net) GB_CONFIG_SUBDIRS(curl, gb.net.curl) diff --git a/gb.gtk.svg/AUTHORS b/gb.gtk.svg/AUTHORS deleted file mode 100644 index e69de29bb..000000000 diff --git a/gb.gtk.svg/COPYING b/gb.gtk.svg/COPYING deleted file mode 120000 index 012065c85..000000000 --- a/gb.gtk.svg/COPYING +++ /dev/null @@ -1 +0,0 @@ -../COPYING \ No newline at end of file diff --git a/gb.gtk.svg/ChangeLog b/gb.gtk.svg/ChangeLog deleted file mode 100644 index 86f0c1cb1..000000000 --- a/gb.gtk.svg/ChangeLog +++ /dev/null @@ -1,241 +0,0 @@ -0.4.3 (net - STABLE / curl - ALPHA - compiles on Gambas 0.94) - -* Fixed a "segmentation fault", when changing user name or password in both HttpClient and FtpClient - -0.4.2 (net - STABLE / curl - ALPHA - compiles on Gambas 0.93b) - -* FtpClient external interface stabilized. - -* Finished 'Curl' class code, and code sharing between 'HttpClient' and 'FtpClient'. - -0.4.1 (net - STABLE / curl - ALPHA - compiles on Gambas 0.93b) - -* Added a new class 'Curl', that is the base for the rest of classes in this component - -* Now HttpClient and FtpClient inherits from 'Curl', so they share a lot of code - -0.4.0 (net - STABLE / curl - ALPHA - compiles on Gambas 0.93b) - -* HttpClient : some code improvements so now it is faster,smaller and wastes less memory. - -* Added 'FtpClient' class. - -0.3.1 (net - STABLE / curl - ALPHA - compiles on Gambas 0.93) - - * Added two new properties to Socket class. They are read/write, the first is called 'Port'. if - value is zero (Net.Local), connection will try to stablish a Local socket, else a TCP connection - will be stablished. The second, 'HostOrPath' can be a Host or a local path. - - * Socket constructor has now no parameters. - - * Conect method has now two optional parameters. The first can override 'HostOrPath' property, and the - second overrides 'Port' property - -0.3.0 (net - STABLE / curl - ALPHA - compiles on Gambas 0.93) - -* Added code to let the IDE show icons for all net classes. -* Removed lots of code to make the component lighter and faster. - -0.2.3 (net - STABLE / curl - ALPHA - compiles on Gambas 0.90) - -* Fixed a bug in UdpClient : segmentation fault when reading or writing data -* Fixed a bug in UDPServerClient example : trying to use CLOSE when UdpClient is not active -* defined before to allow compile on FreeBSD - -0.2.2 (ALPHA - compiles on Gambas 0.81) - -* 'NetCode' and 'AdvancedCode' classes changed to 'Net' -* Proxy properties from 'HttpClient' has been added into a new class called 'Proxy' -* 'ReturnCode' and 'ReturnString' properties are now called 'Code' and 'Reason' -* This version should compile now using libcurl 7.10.3, 7.10.4, 7.10.5, 7.10.6, 7.10.7, 7.10.8 and 7.11.0 -* now is after in all files to allow compile it on FreeBSD - -0.2.1 (ALPHA - compiles on Gambas 0.81) - -* Examples Updated -* New HttpClient interface defined -* 'AdvancedCode' class provides constants for 'Net.Advanced' component - -0.2.0 (ALPHA - compiles on Gambas 0.80) - -* Examples updated -* Modifications in configuration scripts to detect libcurl -* 'NetCode' provide the constants needed to work with all network classes -* 'Net advanced' includes not : CHttpClient, and will include other classes using libcurl -* 'Net' includes now : Socket, SerialPort,ServerSocket,UdpSocket,DnsClient and NetCode, - that is, basic networking stuff -* 'Net' component splitted it two components: 'Net' and 'Advanced net' - -0.1.4 (STABLE - Gambas 0.80) - -BM - Changes to allow the component compile on systems without MSG_NOSIGNAL flag - -0.1.3 (Gambas 0.74) - -BM - 20 Dec 2003 - Let component compile with gcc 2.95 - -0.1.2 - -* Added HTTP proxy support for 'HttpClient' class - -0.1.1 (Gambas 0.73) - -* Corrected bug in 'HttpClient' class that didn't convert correctly - document query to HTTP codification -* Added support for Solaris - -0.1.0 - -* Added 'HttpClient.Local' constant as sinonym of 'HttpClient.Unix' -* Changed 'HttpClient.Inet' constant to 'HttpClient.Internet' - -0.1.0pre7 - -* Using sys/un.h instead of linux/un.h in 'Socket' and 'ServerSocket' - classes -* Added option 'SO_REUSEADDR' to socket in 'ServerSocket' class -* 'ServerSocket' example fixed -* Documentation fixed - - -0.1.0pre6 - -* Memory allocation bug fixed in 'Socket' class -* Memory allocation bug fixed in 'SerialPort' class -* Lots of internal code reorganization -* Some memory optimizations in 'Socket' and 'ServerSocket' -* UDPServerClient example fixed -* ServerSocket example fixed - -0.1.0pre5 - -* Constant names changed in all classes to be more simple -* Parameters in methods and events does not include its type - as a prefix now -* 'ConnectUnix' and 'ConnectSocket' methods merged in one - method : 'Connect' -* 'ServerSocket' 'SocketType' property changed to 'Type' -* 'ConnectionRequest' event in 'ServerSocket' changed to 'Connection' -* 'Accept' method from 'ServerSocket' does not take any parameter - now -* 'HostFound' events from 'Socket' and 'HttpClient' changed to 'Found' -* Datagram class now inherits from '.Stream' -* Removed 'DataPacket' class -* New properties 'SourceHost', 'SourcePort', 'TargetHost', 'TargetPort' - in 'Datagram' class -* New method 'Peek' in 'Datagram' class -* Removed methods 'Stop','Receive' and 'Send' from 'Datagram' class -* 'Start' method from 'Datagram' Changed to 'Bind' -* 'Datagram' class changed its name to 'UdpSocket' -* Documentation updated -* Examples updated - - - -0.1.0pre4 - -* Removed Close() method from 'Socket' and 'SerialPort' classes, - translated to standard stream methods -* 'LookingHostIP' constant in 'Socket' and 'HttpClient' classes, - changed to 'LookingUpHostIP' -* Examples updated -* Documentation updated - - -0.1.0pre3 - - -* 'Accept' method from 'ServerSocket' changed its way to - act. Now it returns a new 'Socket' and accpets an optional - Event Handler -* Old method 'Receive' from HttpClient, splitted - in two new methods : 'Receive' and 'Peek' -* Now 'Socket' class inherits from '.Stream' -* Now 'SerialPort' class inherits from 'Stream' -* Removed 'Send' and 'Receive' methods from 'Socket' -* Removed 'Send' and 'Receive' methods from 'SerialPort' -* Added 'Peek' method to 'Socket' -* Adaptations from generic stream methods to 'Socket' characteristics -* Adaptations from generic stream methods to 'SerialPort' characteristics -* Documentation updated -* Examples updated - - -0.1.0pre2 - -* Added 0.0.17 = 0.1.0pre1 to CHANGELOG file -* 'SocketError' event from Socket and Datagram now is called 'Error' -* 'Error' codes are now negative values in Status property -* 'Error' events from classes which support it, now takes - zero parameters -* References to class names removed from 'GB.Error()' messages -* Class 'ClientSocket' changed its name to 'Socket' -* 'RemoteHostIP' and 'LocalHostIP' properties from 'Socket' - class changed its name to 'RemoteHost' and 'LocalHost' -* Constants from ServerSocket changed its name "TypeTCP"->"iNet", - "TypeUnix"->"Unix" -* 'DataAvailable' event changed its name to 'Read' in all classes - which supports it. -* 'Wait' method from ServerSocket changed to 'Pause' -* 'Path' property from 'Socket' class now returns IP:Port when - connected using TCP sockets. -* 'CloseSocket' method from 'Socket' class changed to 'Close' -* 'Socket' Class has a new constructor. You can both use no - parameters, or pass a string as parameter, which can be : - 'HostName:Port' or 'HostIP:Port' for TCP connections, or - 'Absolute_Path' for Unix connections. -* 'ServerSocket' Class has a new constructor. You can both use no - parameters, or pass a string and a number as parameter, which can be : - ':Port' for TCP connections, or 'Absolute_Path' for Unix connections. -* 'Datagram' Class has a new constructor. You can both use no - parameters, or pass an integer as Port value to start its - work. -* 'MaxConn' parameter from 'Listen' method if ServerSocket class - now is optional. -* 'SendData' and 'ReceiveData' changed to 'Send' and 'Receive' in all - classes containing that methods. - - -0.0.17 = 0.1.0pre1 - -* Removed prefix 'Is' in constats beginning with that prefix. -* 'GetData' method changed its name to 'ReceiveData' is some - classes -* 'Connected' event from 'ClientSocket' changed its name - to 'Connect'. -* Examples updated. -* HttpClient class finished. -* HttpClient documentation added. - - -0.0.16 - -* Added CHANGELOG file. -* Changed component name from 'networking' to 'net'. -* Changed 'sData' property from DataPacket to 'Data'. -* Documentation updated for DataPacket class. -* Changed example names. -* Constant names and values have changed in ClientSocket, some - new constants have been added. -* ConnectSocket and ConnectUnix methods from ClientSocket - have changed, now they not return any value, as error - codes are managed by "SocketError" event. -* Documentation updated for ClientSocket class. -* Example "ClientSocket" updated. -* DnsClient has two new constants. -* Documentation updated for DnsClient class. -* Some ServerSocket constants have changed its name. -* New Constants added to ServerSocket. -* A new static property 'UnixMaxPath' added to ServerSocket. -* ServerSocket 'Listen' method does not return any value now. -* ServerSocket example updated. -* Documentation updated for ServerSocket class. -* Datagram class has new constants. -* Datagram 'Start' method does not return any value now. -* Datagram 'SocketError' event implemented. -* Documentation updated for Datagram class. -* Example "UDPServerClient" updated. -* SerialPort 'GetData' method now is called 'ReceiveData'. -* Added constants to SerialPort class. -* Documentation updated for SerialPort class. -* SerialPort Example updated. diff --git a/gb.gtk.svg/INSTALL b/gb.gtk.svg/INSTALL deleted file mode 120000 index 99d491b4f..000000000 --- a/gb.gtk.svg/INSTALL +++ /dev/null @@ -1 +0,0 @@ -../INSTALL \ No newline at end of file diff --git a/gb.gtk.svg/Makefile.am b/gb.gtk.svg/Makefile.am deleted file mode 100644 index 71167dd07..000000000 --- a/gb.gtk.svg/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 --install -SUBDIRS = @GTK_SVG_DIR@ -EXTRA_DIST = reconf spec gambas.h gb*.h diff --git a/gb.gtk.svg/NEWS b/gb.gtk.svg/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/gb.gtk.svg/README b/gb.gtk.svg/README deleted file mode 100644 index ba33352d5..000000000 --- a/gb.gtk.svg/README +++ /dev/null @@ -1,3 +0,0 @@ -This component is able to load SVG files and generate an image memory of -it, to be used by any component able to manage the gambas image -interface. diff --git a/gb.gtk.svg/acinclude.m4 b/gb.gtk.svg/acinclude.m4 deleted file mode 120000 index d84c32a31..000000000 --- a/gb.gtk.svg/acinclude.m4 +++ /dev/null @@ -1 +0,0 @@ -../acinclude.m4 \ No newline at end of file diff --git a/gb.gtk.svg/component.am b/gb.gtk.svg/component.am deleted file mode 120000 index 2f0eee34f..000000000 --- a/gb.gtk.svg/component.am +++ /dev/null @@ -1 +0,0 @@ -../component.am \ No newline at end of file diff --git a/gb.gtk.svg/configure.ac b/gb.gtk.svg/configure.ac deleted file mode 100644 index f70b47059..000000000 --- a/gb.gtk.svg/configure.ac +++ /dev/null @@ -1,29 +0,0 @@ -dnl ---- configure.ac for gb.gtk.svg - -AC_INIT(configure.ac) -AC_CONFIG_MACRO_DIR([m4]) -GB_INIT(gb.gtk.svg) -AC_PROG_LIBTOOL - -GB_CHECK_XWINDOW - -GB_COMPONENT_PKG_CONFIG( - gtk, - GTK, - [GTK+ component], - [src], - gtk+-2.0 ">= 2.8.0" -) - -GB_COMPONENT_PKG_CONFIG( - gtk_svg, - GTK_SVG, - [SVG loader for GTK+], - [src], - librsvg-2.0 ">= 2.14.3" -) - -AC_OUTPUT( \ -Makefile \ -src/Makefile \ -) diff --git a/gb.gtk.svg/depcomp b/gb.gtk.svg/depcomp deleted file mode 120000 index 7ef7de62b..000000000 --- a/gb.gtk.svg/depcomp +++ /dev/null @@ -1 +0,0 @@ -../depcomp \ No newline at end of file diff --git a/gb.gtk.svg/gambas.h b/gb.gtk.svg/gambas.h deleted file mode 120000 index 03677ecd0..000000000 --- a/gb.gtk.svg/gambas.h +++ /dev/null @@ -1 +0,0 @@ -../main/share/gambas.h \ No newline at end of file diff --git a/gb.gtk.svg/gb.image.h b/gb.gtk.svg/gb.image.h deleted file mode 120000 index c8c09bcc9..000000000 --- a/gb.gtk.svg/gb.image.h +++ /dev/null @@ -1 +0,0 @@ -../main/lib/image/gb.image.h \ No newline at end of file diff --git a/gb.gtk.svg/gb_common.h b/gb.gtk.svg/gb_common.h deleted file mode 120000 index 707d79da6..000000000 --- a/gb.gtk.svg/gb_common.h +++ /dev/null @@ -1 +0,0 @@ -../main/share/gb_common.h \ No newline at end of file diff --git a/gb.gtk.svg/ltmain.sh b/gb.gtk.svg/ltmain.sh deleted file mode 120000 index 50b1c074f..000000000 --- a/gb.gtk.svg/ltmain.sh +++ /dev/null @@ -1 +0,0 @@ -../ltmain.sh \ No newline at end of file diff --git a/gb.gtk.svg/m4 b/gb.gtk.svg/m4 deleted file mode 120000 index 7d49a2a4b..000000000 --- a/gb.gtk.svg/m4 +++ /dev/null @@ -1 +0,0 @@ -../m4 \ No newline at end of file diff --git a/gb.gtk.svg/missing b/gb.gtk.svg/missing deleted file mode 120000 index f3ade9ba1..000000000 --- a/gb.gtk.svg/missing +++ /dev/null @@ -1 +0,0 @@ -../missing \ No newline at end of file diff --git a/gb.gtk.svg/reconf b/gb.gtk.svg/reconf deleted file mode 120000 index 48a376da6..000000000 --- a/gb.gtk.svg/reconf +++ /dev/null @@ -1 +0,0 @@ -../reconf \ No newline at end of file diff --git a/gb.gtk.svg/src/CSVG.c b/gb.gtk.svg/src/CSVG.c deleted file mode 100644 index ea2ff9777..000000000 --- a/gb.gtk.svg/src/CSVG.c +++ /dev/null @@ -1,235 +0,0 @@ -/*************************************************************************** - - CSVG.c - - (C) 2006 Daniel Campos Fernández - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ - -#define __CSVG_C - -#include -#include -#include -#include "main.h" -#include "CSVG.h" - -GB_CLASS SVG_class; - -BEGIN_METHOD_VOID(CSVG_init) - - SVG_class=GB.FindClass("SVG"); - -END_METHOD - -BEGIN_METHOD_VOID(CSVG_free) - - if (THIS->handle) rsvg_handle_free(THIS->handle); - -END_METHOD - -BEGIN_METHOD(CSVG_load,GB_STRING Path;) - - RsvgHandle *handle=NULL; - CSVG *ret=NULL; - char *addr=NULL; - int len=0; - int sck=1024; - - if ( GB.LoadFile (STRING(Path),LENGTH(Path),&addr,&len ) ) - { - GB.Error("File not found"); - GB.ReturnNull(); - return; - } - - if (!len) - { - GB.ReleaseFile(addr,len); - GB.Error("Invalid format"); - GB.ReturnNull(); - return; - } - - handle=rsvg_handle_new(); - rsvg_handle_set_dpi(handle,72); - - if (!handle) - { - GB.ReleaseFile(addr,len); - GB.Error("Unable to create SVG handle"); - GB.ReturnNull(); - return; - } - - while (len) - { - if (len<1024) sck=len; - - len-=sck; - - if (!rsvg_handle_write(handle,(const guchar*)addr,sck,NULL)) - { - rsvg_handle_free(handle); - handle=NULL; - GB.ReleaseFile(addr,len); - GB.Error("Invalid format"); - GB.ReturnNull(); - return; - } - addr+=sck; - } - - GB.ReleaseFile(addr,len); - if (!rsvg_handle_close(handle,NULL)) - { - rsvg_handle_free(handle); - handle=NULL; - GB.Error("Invalid format"); - GB.ReturnNull(); - return; - } - - - GB.New (POINTER(&ret),SVG_class,NULL,NULL); - ret->handle=handle; - ret->dpi=72; - GB.ReturnObject((void*)ret); - -END_METHOD - -BEGIN_PROPERTY(CSVG_image) - - GB_IMG *image; - GdkPixbuf *buf; - int w,h; - unsigned char *p; - - if (!THIS->handle) { GB.ReturnNull(); return; } - - buf=rsvg_handle_get_pixbuf(THIS->handle); - if (!buf) { GB.ReturnNull(); return; } - - w=gdk_pixbuf_get_width(buf); - h=gdk_pixbuf_get_height(buf); - p=gdk_pixbuf_get_pixels(buf); - - switch(gdk_pixbuf_get_n_channels(buf)) - { - case 3: - //GB.Image.Create(&ret,(void*)p,w,h,GB_IMAGE_RGB); - image = IMAGE.Create(w, h, GB_IMAGE_RGB, p); - break; - case 4: - //GB.Image.Create(&ret,(void*)p,w,h,GB_IMAGE_RGBA); - image = IMAGE.Create(w, h, GB_IMAGE_RGBA, p); - break; - - default: - image = NULL; - } - - g_object_unref(G_OBJECT(buf)); - GB.ReturnObject(image); - -END_PROPERTY - -#if 0 -BEGIN_PROPERTY(CSVG_picture) - - GB_PICTURE ret=NULL; - GdkPixbuf *buf; - int w,h; - unsigned char *p; - - if (!THIS->handle) { GB.ReturnNull(); return; } - - buf=rsvg_handle_get_pixbuf(THIS->handle); - if (!buf) { GB.ReturnNull(); return; } - - w=gdk_pixbuf_get_width(buf); - h=gdk_pixbuf_get_height(buf); - p=gdk_pixbuf_get_pixels(buf); - - switch(gdk_pixbuf_get_n_channels(buf)) - { - case 3: - GB.Picture.Create(&ret,(void*)p,w,h,GB_IMAGE_RGB); - break; - case 4: - GB.Picture.Create(&ret,(void*)p,w,h,GB_IMAGE_RGBA); - break; - } - - g_object_unref(G_OBJECT(buf)); - GB.ReturnObject((void*)ret); - -END_PROPERTY -#endif - -BEGIN_PROPERTY(CSVG_width) - - RsvgDimensionData data; - - if (!THIS->handle) { GB.ReturnInteger(0); return; } - - rsvg_handle_get_dimensions(THIS->handle,&data); - GB.ReturnInteger(data.width); - - -END_PROPERTY - -BEGIN_PROPERTY(CSVG_height) - - RsvgDimensionData data; - - if (!THIS->handle) { GB.ReturnInteger(0); return; } - - rsvg_handle_get_dimensions(THIS->handle,&data); - GB.ReturnInteger(data.height); - -END_PROPERTY - -BEGIN_PROPERTY (CSVG_dpi) - - if (READ_PROPERTY) { GB.ReturnFloat(THIS->dpi); return; } - - THIS->dpi=VPROP(GB_FLOAT); - rsvg_handle_set_dpi(THIS->handle,THIS->dpi); - -END_PROPERTY - -GB_DESC CSVGDesc[] = -{ - - GB_DECLARE("SVG", sizeof(CSVG)), GB_NOT_CREATABLE(), - - GB_STATIC_METHOD("_init",NULL,CSVG_init,NULL), - GB_METHOD("_free",NULL,CSVG_free,NULL), - - GB_STATIC_METHOD("Load","SVG",CSVG_load,"(Path)s"), - - GB_PROPERTY_READ("Width","i",CSVG_width), - GB_PROPERTY_READ("Height","i",CSVG_height), - GB_PROPERTY_READ("Image","Image",CSVG_image), - - GB_PROPERTY("DPI","f",CSVG_dpi), - - GB_END_DECLARE -}; - - diff --git a/gb.gtk.svg/src/CSVG.h b/gb.gtk.svg/src/CSVG.h deleted file mode 100644 index 4b4fdf61a..000000000 --- a/gb.gtk.svg/src/CSVG.h +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - - CSVG.h - - (C) 2006 Daniel Campos Fernández - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ -#ifndef __CSVG_H -#define __CSVG_H - -#include -#include - -#include "gambas.h" - -#ifndef __CSVG_C - -extern GB_DESC CSVGDesc[]; - -#else - -#define THIS ((CSVG*)_object) - -#endif - -typedef struct -{ - GB_BASE ob; - RsvgHandle *handle; - double dpi; -} CSVG; - -#endif diff --git a/gb.gtk.svg/src/Makefile.am b/gb.gtk.svg/src/Makefile.am deleted file mode 100644 index 839f14e2c..000000000 --- a/gb.gtk.svg/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -COMPONENT = gb.gtk.svg -include $(top_srcdir)/component.am - -INCLUDES = @GTK_INC@ @GTK_SVG_INC@ - -gblib_LTLIBRARIES = gb.gtk.svg.la - -gb_gtk_svg_la_LIBADD = @GTK_LIB@ @GTK_SVG_LIB@ -gb_gtk_svg_la_LDFLAGS = -module @GTK_LDFLAGS@ @GTK_SVG_LDFLAGS@ - - -gb_gtk_svg_la_SOURCES = main.h main.c CSVG.h CSVG.c - - - - diff --git a/gb.gtk.svg/src/gb.gtk.svg.component b/gb.gtk.svg/src/gb.gtk.svg.component deleted file mode 100644 index 6f3d66e5e..000000000 --- a/gb.gtk.svg/src/gb.gtk.svg.component +++ /dev/null @@ -1,9 +0,0 @@ -[Component] -Key=gb.gtk.svg -Name=GTK+ SVG loader component -Name[es]=Componente para carga de imagenes SVG de GTK+ -Author=Daniel Campos Fernández -Need=ImageProvider -State=2 - - diff --git a/gb.gtk.svg/src/main.c b/gb.gtk.svg/src/main.c deleted file mode 100644 index dc095b26e..000000000 --- a/gb.gtk.svg/src/main.c +++ /dev/null @@ -1,65 +0,0 @@ -/*************************************************************************** - - main.c - - (C) 2006 Daniel Campos Fernández - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ - -#define __MAIN_C - -#include -#include - -#include "CSVG.h" -#include "main.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -GB_INTERFACE GB EXPORT; -IMAGE_INTERFACE IMAGE EXPORT; - -GB_DESC *GB_CLASSES[] EXPORT = -{ - CSVGDesc, - NULL -}; - - - -int EXPORT GB_INIT(void) -{ - GB.GetInterface("gb.image", IMAGE_INTERFACE_VERSION, &IMAGE); - rsvg_init (); - return 0; -} - - - -void EXPORT GB_EXIT() -{ - rsvg_term (); -} - - -#ifdef _cpluscplus -} -#endif - diff --git a/gb.gtk.svg/src/main.h b/gb.gtk.svg/src/main.h deleted file mode 100644 index 3ee1e0508..000000000 --- a/gb.gtk.svg/src/main.h +++ /dev/null @@ -1,35 +0,0 @@ -/*************************************************************************** - - main.h - - (C) 2006 Daniel Campos Fernández - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -***************************************************************************/ - -#ifndef __MAIN_H -#define __MAIN_H - - -#include "gambas.h" -#include "gb.image.h" - -#ifndef __MAIN_C -extern GB_INTERFACE GB; -extern IMAGE_INTERFACE IMAGE; -#endif - -#endif diff --git a/gb.gtk.svg/stamp-h1 b/gb.gtk.svg/stamp-h1 deleted file mode 100644 index 4547fe1b5..000000000 --- a/gb.gtk.svg/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for config.h