| Home | Press | Mailing List | Documentation | Screenshots | People | SourceForge | Downloads |
The main challenge in Windows Film Gimp is that it uses a new dynamically loaded library (dll) architecture for plug-ins. This is a more efficient implementation than fork/spawn as currently in use in the Linux and Mac versions of Film Gimp. The decision was to do the plug-in upgrade now in the Windows version rather than take the approach chosen by Windows GIMP of faking the UNIX environment. The larger problems with the Windows dll code have been resolved.
Rowe's article about porting a Linux GTK+ othello game to Windows, "Porting Gothello", for the January 2002 issue of Linux Journal, served as a rehearsal for the more complex Film Gimp port. That article generated some unfriendly email from certain Free Software advocates who want to pressure Linux programmers to not support Windows. A few have expressed hostility toward the idea of a Windows port of Film Gimp. FYI, there is a Windows GIMP port.
Windows Film Gimp is compiled on Microsoft Visual C++ 6. It uses a unified codebase. That is, the same code compiles on both Linux and Windows. It does not use Cygwin. It is an entirely native Windows port.
FYI, there is a GTK+ UNIX To Win32 Porting Tutorial.
Windows Hacks
Searching for 'getenv'...
FILMGIMP-0.7\app\datafiles.c(71): home = getenv("HOME");
FILMGIMP-0.7\app\displaylut.c(45): if(getenv("WHITETURKEY"))
FILMGIMP-0.7\app\displaylut.c(47): if ((filmVar = getenv("FILM")))
FILMGIMP-0.7\app\gimpbrushlist.c(211): home = getenv("HOME");
FILMGIMP-0.7\app\gimprc.c(312): env_gimp_dir = getenv ("GIMP_DIRECTORY");
FILMGIMP-0.7\app\gimprc.c(313): env_home_dir = getenv ("HOME");
FILMGIMP-0.7\app\gimprc.c(392): home_dir = g_strdup (getenv ("HOME"));
FILMGIMP-0.7\app\gimprc.c(1433): home = getenv ("HOME");
FILMGIMP-0.7\app\gimprc.c(1466): tmp2 = getenv (token);
FILMGIMP-0.7\app\gradient.c(5941): home = getenv("HOME");
FILMGIMP-0.7\app\palette.c(1080): home = getenv("HOME");
FILMGIMP-0.7\libgimp\gimp.c(817): home_dir = getenv ("HOME");
FILMGIMP-0.7\plug-ins\script-fu\interp_slib.c(186): if (getenv ("SIOD_LIB"))
FILMGIMP-0.7\plug-ins\script-fu\interp_slib.c(188): siod_lib = getenv ("SIOD_LIB");
FILMGIMP-0.7\plug-ins\script-fu\interp_slib.c(965): tmpstr = getenv (get_c_string (str));
FILMGIMP-0.7\plug-ins\script-fu\interp_slib.c(3838): init_subr_1 ("getenv", lgetenv);
FILMGIMP-0.7\plug-ins\script-fu\script-fu-scripts.c(195): home = getenv ("HOME");
17 occurrence(s) have been found.
/*
PaintFunc16 paint_func;
PaintFunc16 cursor_func;
*/
/*
#define pipe(x) _pipe(x,256, O_BINARY)
void unsetenv(char* var)
{ char* equalsign=strchr(var,'=');
if(!equalsign)
{ return;
}
*(equalsign+1)=0;
putenv(var);
}
#define snprintf _snprintf
#ifdef WIN32
#include "../win32/unistd.h"
#else
#ifdef WIN32
#include "config.h"
#endif
Works:
GdkEventButton *bevent,
bevent->state & GDK_SHIFT_MASK
struct _GdkEventButton
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
guint32 time;
gdouble x;
gdouble y;
gdouble pressure;
gdouble xtilt;
gdouble ytilt;
guint state;
guint button;
GdkInputSource source;
guint32 deviceid;
gdouble x_root, y_root;
};
Doesn't work:
TransformCore * transform_core;
transform_core->state & ControlMask
int state; state of buttons and keys
The following POSIX macros are defined to check the file
type:
S_ISREG(m) is it a regular file?
S_ISDIR(m) directory?
S_ISCHR(m) character device?
S_ISBLK(m) block device?
S_ISFIFO(m) fifo?
S_ISLNK(m) symbolic link? (Not in POSIX.1-1996.)
S_ISSOCK(m) socket? (Not in POSIX.1-1996.)
The following flags are defined for the st_mode field:
S_IFMT 0170000 bitmask for the file type bitfields
S_IFSOCK 0140000 socket
S_IFLNK 0120000 symbolic link
S_IFREG 0100000 regular file
S_IFBLK 0060000 block device
S_IFDIR 0040000 directory
S_IFCHR 0020000 character device
S_IFIFO 0010000 fifo
S_ISUID 0004000 set UID bit
S_ISGID 0002000 set GID bit (see below)
S_ISVTX 0001000 sticky bit (see below)
S_IRWXU 00700 mask for file owner permissions
S_IRUSR 00400 owner has read permission
S_IWUSR 00200 owner has write permission
S_IXUSR 00100 owner has execute permission
S_IRWXG 00070 mask for group permissions
S_IRGRP 00040 group has read permission
S_IWGRP 00020 group has write permission
S_IXGRP 00010 group has execute permission
S_IRWXO 00007 mask for permissions for others (not in group)
*/
/*
XListFonts
Syntax
char **XListFonts(display, pattern, maxnames, actual_count_return)
Display *display;
char *pattern;
int maxnames;
int *actual_count_return;
Arguments
display Specifies the connection to the X server.
pattern Specifies the null-terminated pattern string that can contain wildcard characters.
maxnames Specifies the maximum number of names to be returned.
actual_count_return Returns the actual number of font names.
Description
The XListFonts() function returns an array of available font names
(as controlled by the font search path; see XSetFontPath()) that match
the string you passed to the pattern argument. The pattern string can
contain any characters, but each asterisk (*) is a wildcard for any
number of characters, and each question mark (?) is a wildcard for a
single character. If the pattern string is not in the Host Portable
Character Encoding, the result is implementation dependent. Use of
uppercase or lowercase does not matter. Each returned string is
null-terminated. If the data returned by the server is in the Latin
Portable Character Encoding, then the returned strings are in the Host
Portable Character Encoding. Otherwise, the result is implementation
dependent. If there are no matching font names, XListFonts() returns
NULL. The client should call XFreeFontNames() when finished with the
result to free the memory.
*/
/*#error Remove_this_line_when_done_testing
*/
/* gtk+\gdk\gdktypes.h:
typedef enum
{
GDK_SHIFT_MASK = 1 << 0,
GDK_LOCK_MASK = 1 << 1,
GDK_CONTROL_MASK = 1 << 2,
GDK_MOD1_MASK = 1 << 3,
GDK_MOD2_MASK = 1 << 4,
GDK_MOD3_MASK = 1 << 5,
GDK_MOD4_MASK = 1 << 6,
GDK_MOD5_MASK = 1 << 7,
GDK_BUTTON1_MASK = 1 << 8,
GDK_BUTTON2_MASK = 1 << 9,
GDK_BUTTON3_MASK = 1 << 10,
GDK_BUTTON4_MASK = 1 << 11,
GDK_BUTTON5_MASK = 1 << 12,
GDK_RELEASE_MASK = 1 << 13,
GDK_MODIFIER_MASK = 0x3fff
} GdkModifierType;
*/
/* filmgimp vcpp project C++ include setting:
../../,../../../glib-dev/src/glib/,../../../gtk/src/gtk+/,../../../gtk/src/gtk+/gdk
*/