[DEVELOPMENT ENVIRONMENT]
* NEW: In the open project dialog, you can now uncompress archives by double-clicking on it. There is a confirmation message of course. [GB.IMAGE.IMLIB] * NEW: I want to use ImLib2 to enhance the image component. Does nothing at the moment! git-svn-id: svn://localhost/gambas/trunk@2282 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
5995c33772
commit
a18348f8cd
29 changed files with 249 additions and 10 deletions
|
@ -127,7 +127,26 @@ End
|
|||
|
||||
Public Sub fvwProject_Activate()
|
||||
|
||||
dchProject.Value = fvwProject.Dir &/ fvwProject.Current
|
||||
Dim sPath As String = fvwProject.Dir &/ fvwProject.Current
|
||||
Dim sProg As String
|
||||
|
||||
If IsDir(sPath) Then
|
||||
dchProject.Value = sPath
|
||||
Return
|
||||
Endif
|
||||
|
||||
If sPath Like "*.tar.gz" Then
|
||||
sProg = "tar xfz"
|
||||
Else If sPath Like "*.tar.bz2" Then
|
||||
sProg = "tar xfj"
|
||||
Else
|
||||
Return
|
||||
Endif
|
||||
|
||||
If Message.Question("<b>" & fvwProject.Current & "</b><p>" & ("Do you want to uncompress this archive?"), ("Uncompress"), ("Cancel")) = 2 Then Return
|
||||
|
||||
Shell "cd " & Shell$(File.Dir(sPath)) & " && " & sProg & " " & Shell$(sPath) Wait
|
||||
dchProject.Reload
|
||||
|
||||
End
|
||||
|
||||
|
@ -283,3 +302,9 @@ Public Sub lstExample_Activate()
|
|||
btnOK.Value = True
|
||||
|
||||
End
|
||||
|
||||
Public Sub fvwProject_Menu()
|
||||
|
||||
Debug
|
||||
|
||||
End
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Gambas Form File 3.0
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(0,0,99,77)
|
||||
MoveScaled(0,0,105,77)
|
||||
Text = ("Select a project")
|
||||
Icon = Picture["icon:/32/open"]
|
||||
Persistent = True
|
||||
|
@ -29,10 +29,10 @@
|
|||
MoveScaled(50,3,42,56)
|
||||
Arrangement = Arrange.Vertical
|
||||
{ sdpProject SidePanel
|
||||
MoveScaled(1,3,40,12)
|
||||
MoveScaled(1,1,40,12)
|
||||
Arrangement = Arrange.Fill
|
||||
{ panProject Panel
|
||||
MoveScaled(5,3,34,7)
|
||||
MoveScaled(2,0,34,7)
|
||||
Background = Color.TextBackground
|
||||
Arrangement = Arrange.Fill
|
||||
Padding = 2
|
||||
|
@ -40,7 +40,7 @@
|
|||
}
|
||||
}
|
||||
{ fvwProject FileView
|
||||
MoveScaled(1,23,40,32)
|
||||
MoveScaled(1,14,40,37)
|
||||
Expand = True
|
||||
ShowDetailed = True
|
||||
ShowDirectory = True
|
||||
|
@ -82,12 +82,12 @@
|
|||
Expand = True
|
||||
}
|
||||
{ btnOK Button
|
||||
MoveScaled(48,0,14,4)
|
||||
MoveScaled(48,0,15,4)
|
||||
Text = ("OK")
|
||||
Default = True
|
||||
}
|
||||
{ btnCancel Button
|
||||
MoveScaled(65,0,14,4)
|
||||
MoveScaled(65,0,15,4)
|
||||
Text = ("Cancel")
|
||||
Cancel = True
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ GB_CONFIG_SUBDIRS(desktop, gb.desktop)
|
|||
GB_CONFIG_SUBDIRS(qt4, gb.qt4)
|
||||
GB_CONFIG_SUBDIRS(cairo, gb.cairo)
|
||||
GB_CONFIG_SUBDIRS(imageio, gb.image.io)
|
||||
GB_CONFIG_SUBDIRS(imageimlib, gb.image.imlib)
|
||||
|
||||
AC_CONFIG_SUBDIRS(comp)
|
||||
AC_CONFIG_SUBDIRS(app)
|
||||
|
|
0
gb.image.imlib/AUTHORS
Normal file
0
gb.image.imlib/AUTHORS
Normal file
1
gb.image.imlib/COPYING
Symbolic link
1
gb.image.imlib/COPYING
Symbolic link
|
@ -0,0 +1 @@
|
|||
../COPYING
|
0
gb.image.imlib/ChangeLog
Normal file
0
gb.image.imlib/ChangeLog
Normal file
1
gb.image.imlib/INSTALL
Symbolic link
1
gb.image.imlib/INSTALL
Symbolic link
|
@ -0,0 +1 @@
|
|||
../INSTALL
|
3
gb.image.imlib/Makefile.am
Normal file
3
gb.image.imlib/Makefile.am
Normal file
|
@ -0,0 +1,3 @@
|
|||
ACLOCAL_AMFLAGS = -I m4 --install
|
||||
SUBDIRS = @IMAGE_IMLIB_DIR@
|
||||
EXTRA_DIST = reconf gambas.h gb*.h
|
0
gb.image.imlib/NEWS
Normal file
0
gb.image.imlib/NEWS
Normal file
0
gb.image.imlib/README
Normal file
0
gb.image.imlib/README
Normal file
1
gb.image.imlib/acinclude.m4
Symbolic link
1
gb.image.imlib/acinclude.m4
Symbolic link
|
@ -0,0 +1 @@
|
|||
../acinclude.m4
|
1
gb.image.imlib/component.am
Symbolic link
1
gb.image.imlib/component.am
Symbolic link
|
@ -0,0 +1 @@
|
|||
../component.am
|
1
gb.image.imlib/config.guess
vendored
Symbolic link
1
gb.image.imlib/config.guess
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../config.guess
|
1
gb.image.imlib/config.sub
vendored
Symbolic link
1
gb.image.imlib/config.sub
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../config.sub
|
16
gb.image.imlib/configure.ac
Normal file
16
gb.image.imlib/configure.ac
Normal file
|
@ -0,0 +1,16 @@
|
|||
dnl ---- configure.ac for gb.image.imlib
|
||||
|
||||
AC_INIT(configure.ac)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
GB_INIT(gb.image.imlib)
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
GB_COMPONENT_PKG_CONFIG(
|
||||
image_imlib,
|
||||
IMAGE_IMLIB,
|
||||
[Image routines based on the Imlib2 library],
|
||||
[src],
|
||||
imlib2 ">= 1.4.0"
|
||||
)
|
||||
|
||||
AC_OUTPUT( Makefile src/Makefile )
|
1
gb.image.imlib/gambas.h
Symbolic link
1
gb.image.imlib/gambas.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/share/gambas.h
|
1
gb.image.imlib/gb.image.h
Symbolic link
1
gb.image.imlib/gb.image.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/lib/image/gb.image.h
|
1
gb.image.imlib/gb_common.h
Symbolic link
1
gb.image.imlib/gb_common.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/share/gb_common.h
|
1
gb.image.imlib/ltmain.sh
Symbolic link
1
gb.image.imlib/ltmain.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
../ltmain.sh
|
1
gb.image.imlib/m4
Symbolic link
1
gb.image.imlib/m4
Symbolic link
|
@ -0,0 +1 @@
|
|||
../m4
|
1
gb.image.imlib/reconf
Symbolic link
1
gb.image.imlib/reconf
Symbolic link
|
@ -0,0 +1 @@
|
|||
../reconf
|
11
gb.image.imlib/src/Makefile.am
Normal file
11
gb.image.imlib/src/Makefile.am
Normal file
|
@ -0,0 +1,11 @@
|
|||
COMPONENT = gb.image.imlib
|
||||
include $(top_srcdir)/component.am
|
||||
|
||||
INCLUDES = @IMAGE_IMLIB_INC@
|
||||
|
||||
gblib_LTLIBRARIES = gb.image.imlib.la
|
||||
|
||||
gb_image_imlib_la_LIBADD = @IMAGE_IMLIB_LIB@
|
||||
gb_image_imlib_la_LDFLAGS = -module @LD_FLAGS@ @IMAGE_IMLIB_LDFLAGS@
|
||||
|
||||
gb_image_imlib_la_SOURCES = main.c main.h c_image.c c_image.h
|
33
gb.image.imlib/src/c_image.c
Normal file
33
gb.image.imlib/src/c_image.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
/***************************************************************************
|
||||
|
||||
c_image.c
|
||||
|
||||
(c) 2000-2009 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#define __C_IMAGE_C
|
||||
|
||||
#include "c_image.h"
|
||||
|
||||
GB_DESC CImageDesc[] =
|
||||
{
|
||||
GB_DECLARE("Image", sizeof(CIMAGE)),
|
||||
|
||||
GB_END_DECLARE
|
||||
};
|
||||
|
43
gb.image.imlib/src/c_image.h
Normal file
43
gb.image.imlib/src/c_image.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/***************************************************************************
|
||||
|
||||
c_image.h
|
||||
|
||||
(c) 2000-2009 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __C_IMAGE_H
|
||||
#define __C_IMAGE_H
|
||||
|
||||
#include "main.h"
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
GB_IMG img;
|
||||
}
|
||||
CIMAGE;
|
||||
|
||||
#ifndef __C_IMAGE_C
|
||||
extern GB_DESC CImageDesc[];
|
||||
#else
|
||||
|
||||
#define THIS ((GB_IMG *)_object)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __CIMAGE_H */
|
6
gb.image.imlib/src/gb.image.imlib.component
Normal file
6
gb.image.imlib/src/gb.image.imlib.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.image.io
|
||||
Author=Benoît Minisini
|
||||
State=0
|
||||
Implements=ImageIO
|
||||
Requires=gb.image
|
45
gb.image.imlib/src/main.c
Normal file
45
gb.image.imlib/src/main.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
/***************************************************************************
|
||||
|
||||
main.c
|
||||
|
||||
(c) 2000-2009 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#define __MAIN_C
|
||||
|
||||
#include "main.h"
|
||||
#include "c_image.h"
|
||||
|
||||
GB_INTERFACE GB EXPORT;
|
||||
IMAGE_INTERFACE IMAGE EXPORT;
|
||||
|
||||
GB_DESC *GB_CLASSES[] EXPORT =
|
||||
{
|
||||
CImageDesc,
|
||||
NULL
|
||||
};
|
||||
|
||||
int EXPORT GB_INIT(void)
|
||||
{
|
||||
GB.GetInterface("gb.image", IMAGE_INTERFACE_VERSION, &IMAGE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void EXPORT GB_EXIT()
|
||||
{
|
||||
}
|
37
gb.image.imlib/src/main.h
Normal file
37
gb.image.imlib/src/main.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/***************************************************************************
|
||||
|
||||
main.h
|
||||
|
||||
(c) 2000-2009 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __MAIN_H
|
||||
#define __MAIN_H
|
||||
|
||||
#include "gambas.h"
|
||||
#include "gb.image.h"
|
||||
#include "gb_common.h"
|
||||
|
||||
#include <Imlib2.h>
|
||||
|
||||
#ifndef __MAIN_C
|
||||
extern GB_INTERFACE GB;
|
||||
extern IMAGE_INTERFACE IMAGE;
|
||||
#endif
|
||||
|
||||
#endif /* __MAIN_H */
|
|
@ -441,7 +441,7 @@ void LIBRARY_delete(LIBRARY *lib)
|
|||
void LIBRARY_load(LIBRARY *lib)
|
||||
{
|
||||
int (*func)();
|
||||
GB_INTERFACE *iface;
|
||||
void *iface;
|
||||
GB_DESC **desc;
|
||||
char *path;
|
||||
|
||||
|
@ -475,8 +475,14 @@ void LIBRARY_load(LIBRARY *lib)
|
|||
|
||||
/* Interface de Gambas */
|
||||
|
||||
iface = get_symbol(lib, LIB_GAMBAS, TRUE);
|
||||
copy_interface((intptr_t *)(void *)GAMBAS_Api, (intptr_t *)(void *)iface);
|
||||
//iface = get_symbol(lib, LIB_GAMBAS_PTR, FALSE);
|
||||
//if (iface)
|
||||
// *((void **)iface) = &GAMBAS_Api;
|
||||
//else
|
||||
{
|
||||
iface = get_symbol(lib, LIB_GAMBAS, TRUE);
|
||||
copy_interface((intptr_t *)(void *)GAMBAS_Api, (intptr_t *)(void *)iface);
|
||||
}
|
||||
|
||||
/* Signal function */
|
||||
lib->signal = (void(*)())get_symbol(lib, LIB_SIGNAL, FALSE);
|
||||
|
|
|
@ -40,6 +40,7 @@ typedef
|
|||
#define LIB_SIGNAL "GB_SIGNAL"
|
||||
#define LIB_INFO "GB_INFO"
|
||||
#define LIB_GAMBAS "GB"
|
||||
//#define LIB_GAMBAS_PTR "GB_PTR"
|
||||
|
||||
#ifdef DONT_USE_LTDL
|
||||
#ifdef OS_OPENBSD
|
||||
|
|
Loading…
Reference in a new issue