Commit 3970020c authored by luc.moulinier's avatar luc.moulinier

update admin, seqlab

parent 0f0e3a77
......@@ -2,8 +2,10 @@ BINDIR = ../bin
CC = gcc -g -Wall
INC = -I/mingw/include -I/c/tcl/include/tcl8.6 -I.
LIBS = -L/c/tcl/lib -ltclstub86 -ltkstub86 -lgdi32
#INC = -I/mingw/include -I/c/TclTk64-8.6.7/include/tcl8.6 -I. -I/c/TclTk64-8.6.7/tk867-src/tk8.6.7/generic
INC = -I. -I"/c/TclTk64-8.6.7//include" -I"/c/TclTk64-8.6.7/tk867-src/tk8.6.7/generic" -I"/c/TclTk64-8.6.7/tk867-src/tk8.6.7/win" -I"/c/TclTk64-8.6.7/tk867-src/tk8.6.7/generic/ttk" -I""/c/TclTk64-8.6.7/tk867-src/tk8.6.7/xlib""
LIBS = -L/c/TclTk64-8.6.7/lib -ltclstub86 -ltkstub86 -lgdi32
PROGS = biotext
......@@ -15,7 +17,7 @@ all : $(PROGS)
@echo done.
biotext : $(OBJWALI)
$(CC) -O2 -shared -o biotext0.1.dll $(OBJWALI) $(LIBS)
$(CC) -O2 -shared -o biotext01.dll $(OBJWALI) $(LIBS)
@echo done.
tkBiotext.o : tkBiotext.c $(HEADER)
* tkFont.h --
* Declarations for interfaces between the generic and platform-specific
* parts of the font package. This information is not visible outside of
* the font package.
* Copyright (c) 1996-1997 Sun Microsystems, Inc.
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
* RCS: @(#) $Id: tkFont.h,v 1.13 2008/11/05 23:29:58 nijtmans Exp $
#ifndef _TKFONT
#define _TKFONT
#ifdef BUILD_tk
* The following structure keeps track of the attributes of a font. It can be
* used to keep track of either the desired attributes or the actual
* attributes gotten when the font was instantiated.
struct TkFontAttributes {
Tk_Uid family; /* Font family, or NULL to represent plaform-
* specific default system font. */
int size; /* Pointsize of font, 0 for default size, or
* negative number meaning pixel size. */
int weight; /* Weight flag; see below for def'n. */
int slant; /* Slant flag; see below for def'n. */
int underline; /* Non-zero for underline font. */
int overstrike; /* Non-zero for overstrike font. */
* Possible values for the "weight" field in a TkFontAttributes structure.
* Weight is a subjective term and depends on what the company that created
* the font considers bold.
#define TK_FW_NORMAL 0
#define TK_FW_BOLD 1
#define TK_FW_UNKNOWN -1 /* Unknown weight. This value is used for
* error checking and is never actually stored
* in the weight field. */
* Possible values for the "slant" field in a TkFontAttributes structure.
#define TK_FS_ROMAN 0
#define TK_FS_ITALIC 1
#define TK_FS_OBLIQUE 2 /* This value is only used when parsing X font
* names to determine the closest match. It is
* only stored in the XLFDAttributes
* structure, never in the slant field of the
* TkFontAttributes. */
#define TK_FS_UNKNOWN -1 /* Unknown slant. This value is used for error
* checking and is never actually stored in
* the slant field. */
* The following structure keeps track of the metrics for an instantiated
* font. The metrics are the physical properties of the font itself.
typedef struct TkFontMetrics {
int ascent; /* From baseline to top of font. */
int descent; /* From baseline to bottom of font. */
int maxWidth; /* Width of widest character in font. */
int fixed; /* Non-zero if this is a fixed-width font,
* 0 otherwise. */
} TkFontMetrics;
* The following structure is used to keep track of the generic information
* about a font. Each platform-specific font is represented by a structure
* with the following structure at its beginning, plus any platform-specific
* stuff after that.
typedef struct TkFont {
* Fields used and maintained exclusively by generic code.
int resourceRefCount; /* Number of active uses of this font (each
* active use corresponds to a call to
* Tk_AllocFontFromTable or Tk_GetFont). If
* this count is 0, then this TkFont structure
* is no longer valid and it isn't present in
* a hash table: it is being kept around only
* because there are objects referring to it.
* The structure is freed when
* resourceRefCount and objRefCount are both
* 0. */
int objRefCount; /* The number of Tcl objects that reference
* this structure. */
Tcl_HashEntry *cacheHashPtr;/* Entry in font cache for this structure,
* used when deleting it. */
Tcl_HashEntry *namedHashPtr;/* Pointer to hash table entry that
* corresponds to the named font that the
* tkfont was based on, or NULL if the tkfont
* was not based on a named font. */
Screen *screen; /* The screen where this font is valid. */
int tabWidth; /* Width of tabs in this font (pixels). */
int underlinePos; /* Offset from baseline to origin of underline
* bar (used for drawing underlines on a
* non-underlined font). */
int underlineHeight; /* Height of underline bar (used for drawing
* underlines on a non-underlined font). */
* Fields used in the generic code that are filled in by
* platform-specific code.
Font fid; /* For backwards compatibility with XGCValues
* structures. Remove when TkGCValues is
* implemented. */
TkFontAttributes fa; /* Actual font attributes obtained when the
* the font was created, as opposed to the
* desired attributes passed in to
* TkpGetFontFromAttributes(). The desired
* metrics can be determined from the string
* that was used to create this font. */
TkFontMetrics fm; /* Font metrics determined when font was
* created. */
struct TkFont *nextPtr; /* Points to the next TkFont structure with
* the same name. All fonts with the same name
* (but different displays) are chained
* together off a single entry in a hash
* table. */
} TkFont;
* The following structure is used to return attributes when parsing an XLFD.
* The extra information is of interest to the Unix-specific code when
* attempting to find the closest matching font.
typedef struct TkXLFDAttributes {
Tk_Uid foundry; /* The foundry of the font. */
int slant; /* The tristate value for the slant, which is
* significant under X. */
int setwidth; /* The proportionate width, see below for
* definition. */
Tk_Uid charset; /* The actual charset string. */
} TkXLFDAttributes;
* Possible values for the "setwidth" field in a TkXLFDAttributes structure.
* The setwidth is whether characters are considered wider or narrower than
* normal.
#define TK_SW_NORMAL 0
#define TK_SW_CONDENSE 1
#define TK_SW_EXPAND 2
#define TK_SW_UNKNOWN 3 /* Unknown setwidth. This value may be stored
* in the setwidth field. */
* The following defines specify the meaning of the fields in a fully
* qualified XLFD.
#define XLFD_FOUNDRY 0
#define XLFD_FAMILY 1
#define XLFD_WEIGHT 2
#define XLFD_SLANT 3
#define XLFD_ADD_STYLE 5
#define XLFD_SPACING 10
#define XLFD_CHARSET 12
#define XLFD_NUMFIELDS 13 /* Number of fields in XLFD. */
* Low-level API exported by generic code to platform-specific code.
#define TkInitFontAttributes(fa) memset((fa), 0, sizeof(TkFontAttributes));
#define TkInitXLFDAttributes(xa) memset((xa), 0, sizeof(TkXLFDAttributes));
MODULE_SCOPE int TkFontParseXLFD(const char *string,
TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr);
MODULE_SCOPE const char *const * TkFontGetAliasList(const char *faceName);
MODULE_SCOPE const char *const *const * TkFontGetFallbacks(void);
MODULE_SCOPE int TkFontGetPixels(Tk_Window tkwin, int size);
MODULE_SCOPE int TkFontGetPoints(Tk_Window tkwin, int size);
MODULE_SCOPE const char *const * TkFontGetGlobalClass(void);
MODULE_SCOPE const char *const * TkFontGetSymbolClass(void);
MODULE_SCOPE int TkCreateNamedFont(Tcl_Interp *interp, Tk_Window tkwin,
const char *name, TkFontAttributes *faPtr);
MODULE_SCOPE int TkDeleteNamedFont(Tcl_Interp *interp,
Tk_Window tkwin, const char *name);
MODULE_SCOPE int TkFontGetFirstTextLayout(Tk_TextLayout layout,
Tk_Font *font, char *dst);
* Low-level API exported by platform-specific code to generic code.
MODULE_SCOPE void TkpDeleteFont(TkFont *tkFontPtr);
MODULE_SCOPE void TkpFontPkgInit(TkMainInfo *mainPtr);
MODULE_SCOPE TkFont * TkpGetFontFromAttributes(TkFont *tkFontPtr,
Tk_Window tkwin, const TkFontAttributes *faPtr);
MODULE_SCOPE void TkpGetFontFamilies(Tcl_Interp *interp,
Tk_Window tkwin);
MODULE_SCOPE TkFont * TkpGetNativeFont(Tk_Window tkwin, const char *name);
#endif /* _TKFONT */
* tkWin.h --
* Declarations of public types and interfaces that are only
* available under Windows.
* Copyright (c) 1996-1997 by Sun Microsystems, Inc.
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
* RCS: @(#) $Id: tkWin.h,v 1.15 2007/12/13 15:28:52 dgp Exp $
#ifndef _TKWIN
#define _TKWIN
* We must specify the lower version we intend to support. In particular
* the SystemParametersInfo API doesn't like to receive structures that
* are larger than it expects which affects the font assignements.
* WINVER = 0x0410 means Windows 98 and above
#ifndef WINVER
#define WINVER 0x0410
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0410
#ifndef _TK
#include <tk.h>
#include <windows.h>
#ifdef BUILD_tk
* The following messages are used to communicate between a Tk toplevel
* and its container window. A Tk container may not be able to provide
* service to all of the following requests at the moment. But an embedded
* Tk window will send out these requests to support external Tk container
* application.
#define TK_CLAIMFOCUS (WM_USER) /* an embedded window requests to focus */
#define TK_GEOMETRYREQ (WM_USER+1) /* an embedded window requests to change size */
#define TK_ATTACHWINDOW (WM_USER+2) /* an embedded window requests to attach */
#define TK_DETACHWINDOW (WM_USER+3) /* an embedded window requests to detach */
#define TK_MOVEWINDOW (WM_USER+4) /* an embedded window requests to move */
#define TK_RAISEWINDOW (WM_USER+5) /* an embedded window requests to raise */
#define TK_ICONIFY (WM_USER+6) /* an embedded window requests to iconify */
#define TK_DEICONIFY (WM_USER+7) /* an embedded window requests to deiconify */
#define TK_WITHDRAW (WM_USER+8) /* an embedded window requests to withdraw */
#define TK_GETFRAMEWID (WM_USER+9) /* an embedded window requests a frame window id */
#define TK_OVERRIDEREDIRECT (WM_USER+10) /* an embedded window requests to overrideredirect */
#define TK_SETMENU (WM_USER+11) /* an embedded window requests to setup menu */
#define TK_STATE (WM_USER+12) /* an embedded window sets/gets state */
#define TK_INFO (WM_USER+13) /* an embedded window requests a container's info */
* The following are sub-messages (wParam) for TK_INFO. An embedded window may
* send a TK_INFO message with one of the sub-messages to query a container
* for verification and availability
* Exported procedures defined for the Windows platform only.
#include "tkPlatDecls.h"
#endif /* _TKWIN */
This diff is collapsed.
* tkWinInt.h --
* This file contains declarations that are shared among the
* Windows-specific parts of Tk, but aren't used by the rest of Tk.
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
* Copyright (c) 1998-2000 by Scriptics Corporation.
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
* RCS: @(#) $Id: tkWinInt.h,v 1.31 2007/12/14 15:56:09 patthoyts Exp $
#ifndef _TKWININT
#define _TKWININT
#ifndef _TKINT
#include "tkInt.h"
* Include platform specific public interfaces.
#ifndef _TKWIN
#include "tkWin.h"
#ifndef _TKPORT
#include "tkPort.h"
* Define constants missing from older Win32 SDK header files.
#define WS_EX_TOOLWINDOW 0x00000080L
* The TkWinDCState is used to save the state of a device context so that it
* can be restored later.
typedef struct TkWinDCState {
HPALETTE palette;
int bkmode;
} TkWinDCState;
* The TkWinDrawable is the internal implementation of an X Drawable (either a
* Window or a Pixmap). The following constants define the valid Drawable
* types.
#define TWD_BITMAP 1
#define TWD_WINDOW 2
#define TWD_WINDC 3
typedef struct {
int type;
HWND handle;
TkWindow *winPtr;
} TkWinWindow;
typedef struct {
int type;
HBITMAP handle;
Colormap colormap;
int depth;
} TkWinBitmap;
typedef struct {
int type;
HDC hdc;
typedef union {
int type;
TkWinWindow window;
TkWinBitmap bitmap;
TkWinDC winDC;
} TkWinDrawable;
* The following macros are used to retrieve internal values from a Drawable.
#define TkWinGetHWND(w) (((TkWinDrawable *) w)->window.handle)
#define TkWinGetWinPtr(w) (((TkWinDrawable *) w)->window.winPtr)
#define TkWinGetHBITMAP(w) (((TkWinDrawable *) w)->bitmap.handle)
#define TkWinGetColormap(w) (((TkWinDrawable *) w)->bitmap.colormap)
#define TkWinGetHDC(w) (((TkWinDrawable *) w)->winDC.hdc)
* The following structure is used to encapsulate palette information.
typedef struct {
HPALETTE palette; /* Palette handle used when drawing. */
UINT size; /* Number of entries in the palette. */
int stale; /* 1 if palette needs to be realized,
* otherwise 0. If the palette is stale, then
* an idle handler is scheduled to realize the
* palette. */
Tcl_HashTable refCounts; /* Hash table of palette entry reference
* counts indexed by pixel value. */
} TkWinColormap;
* The following macro retrieves the Win32 palette from a colormap.
#define TkWinGetPalette(colormap) (((TkWinColormap *) colormap)->palette)
* The following macros define the class names for Tk Window types.
* The following variable is a translation table between X gc functions and
* Win32 raster and BitBlt op modes.
extern int tkpWinRopModes[];
extern int tkpWinBltModes[];
* The following defines are used with TkWinGetBorderPixels to get the extra 2
* border colors from a Tk_3DBorder.
#define TK_3D_LIGHT2 TK_3D_DARK_GC+1
#define TK_3D_DARK2 TK_3D_DARK_GC+2
* Internal functions used by more than one source file.
#include "tkIntPlatDecls.h"
* We need to specially add the TkWinChildProc because of the special
* prototype it has (doesn't fit into stubs schema)
#ifdef BUILD_tk
WPARAM wParam, LPARAM lParam);
* Special proc needed as tsd accessor function between
* tkWinX.c:GenerateXEvent and tkWinClipboard.c:UpdateClipboard
EXTERN void TkWinUpdatingClipboard(int mode);
* Used by tkWinDialog.c to associate the right icon with tk_messageBox
EXTERN HICON TkWinGetIcon(Tk_Window tkw, DWORD iconsize);
* Used by tkWinX.c on for certain system display change messages and cleanup
* up containers
EXTERN void TkWinDisplayChanged(Display *display);
void TkWinCleanupContainerList(void);
* Used by tkWinWm.c for embedded menu handling. May become public.
EXTERN HWND Tk_GetMenuHWND(Tk_Window tkwin);
EXTERN HWND Tk_GetEmbeddedMenuHWND(Tk_Window tkwin);
* The following structure keeps track of whether we are using the multi-byte
* or the wide-character interfaces to the operating system. System calls
* should be made through the following function table.
* While some system calls need to use this A/W jump-table, it is not
* necessary for all calls to do it, which is why you won't see this used
* throughout the Tk code, but only in key areas. -- hobbs
typedef struct TkWinProcs {
int useWide;
LRESULT (WINAPI *callWindowProc)(WNDPROC lpPrevWndFunc, HWND hWnd,
UINT Msg, WPARAM wParam, LPARAM lParam);
LRESULT (WINAPI *defWindowProc)(HWND hWnd, UINT Msg, WPARAM wParam,
LPARAM lParam);
ATOM (WINAPI *registerClass)(const WNDCLASS *lpWndClass);
BOOL (WINAPI *setWindowText)(HWND hWnd, LPCTSTR lpString);
HWND (WINAPI *createWindowEx)(DWORD dwExStyle, LPCTSTR lpClassName,
LPCTSTR lpWindowName, DWORD dwStyle, int x, int y,
int nWidth, int nHeight, HWND hWndParent, HMENU hMenu,
HINSTANCE hInstance, LPVOID lpParam);
BOOL (WINAPI *insertMenu)(HMENU hMenu, UINT uPosition, UINT uFlags,
UINT uIDNewItem, LPCTSTR lpNewItem);
int (WINAPI *getWindowText)(HWND hWnd, LPCTSTR lpString, int nMaxCount);
} TkWinProcs;
EXTERN TkWinProcs *tkWinProcs;
* The following allows us to cache these encoding for multiple functions.
extern Tcl_Encoding TkWinGetKeyInputEncoding(void);
extern Tcl_Encoding TkWinGetUnicodeEncoding(void);
extern void TkWinSetupSystemFonts(TkMainInfo *mainPtr);
* Values returned by TkWinGetPlatformTheme.
#define TK_THEME_WIN_XP 2
* The following is implemented in tkWinWm and used by tkWinEmbed.c
void TkpWinToplevelWithDraw(TkWindow *winPtr);
void TkpWinToplevelIconify(TkWindow *winPtr);
void TkpWinToplevelDeiconify(TkWindow *winPtr);
long TkpWinToplevelIsControlledByWm(TkWindow *winPtr);
long TkpWinToplevelMove(TkWindow *winPtr, int x, int y);
long TkpWinToplevelOverrideRedirect(TkWindow *winPtr,
int reqValue);
void TkpWinToplevelDetachWindow(TkWindow *winPtr);
int TkpWmGetState(TkWindow *winPtr);
* The following functions are not present in old versions of Windows
* API headers but are used in the Tk source to ensure 64bit
* compatability.
#ifndef GetClassLongPtr
# define GetClassLongPtrA GetClassLongA
# define GetClassLongPtrW GetClassLongW
# define SetClassLongPtrA SetClassLongA
# define SetClassLongPtrW SetClassLongW
# ifdef UNICODE
# define GetClassLongPtr GetClassLongPtrW
# define SetClassLongPtr SetClassLongPtrW
# else
# define GetClassLongPtr GetClassLongPtrA
# define SetClassLongPtr SetClassLongPtrA
# endif /* !UNICODE */
#endif /* !GetClassLongPtr */
#ifndef GCLP_HICON
#endif /* !GCLP_HICON */
# define GCLP_HICONSM (-34)
#endif /* !GCLP_HICONSM */
#ifndef GetWindowLongPtr
# define GetWindowLongPtrA GetWindowLongA
# define GetWindowLongPtrW GetWindowLongW
# define SetWindowLongPtrA SetWindowLongA
# define SetWindowLongPtrW SetWindowLongW
# ifdef UNICODE
# define GetWindowLongPtr GetWindowLongPtrW
# define SetWindowLongPtr SetWindowLongPtrW
# else
# define GetWindowLongPtr GetWindowLongPtrW
# define SetWindowLongPtr SetWindowLongPtrW
# endif /* !UNICODE */
#endif /* !GetWindowLongPtr */
#define GWLP_ID GWL_ID
#endif /* !GWLP_WNDPROC */
#endif /* _TKWININT */
* tkWinPort.h --
* This header file handles porting issues that occur because of
* differences between Windows and Unix. It should be the only
* file that contains #ifdefs to handle different flavors of OS.
* Copyright (c) 1995-1996 Sun Microsystems, Inc.
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
* RCS: @(#) $Id: tkWinPort.h,v 1.10 2005/09/28 18:31:57 dgp Exp $
#ifndef _WINPORT
#define _WINPORT
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <malloc.h>
#include <errno.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include <io.h>
* Need to block out this include for building extensions with MetroWerks
* compiler for Win32.
#ifndef __MWERKS__
#include <sys/stat.h>
#include <time.h>
#ifdef __CYGWIN__
# define _T(x) L##x
# include <tchar.h>
#ifdef _MSC_VER
# define hypot _hypot
#endif /* _MSC_VER */
#ifndef __GNUC__
# define strncasecmp strnicmp
# define strcasecmp stricmp
#define NBBY 8
#ifndef OPEN_MAX
#define OPEN_MAX 32
* The following define causes Tk to use its internal keysym hash table
* The following macro checks to see whether there is buffered
* input data available for a stdio FILE.
#ifdef _MSC_VER
# define TK_READ_DATA_PENDING(f) ((f)->_cnt > 0)
#else /* _MSC_VER */
# define TK_READ_DATA_PENDING(f) ((f)->level > 0)
#endif /* _MSC_VER */
* The following stubs implement various calls that don't do anything
* under Windows.
#define TkFreeWindowId(dispPtr,w)
#define TkInitXId(dispPtr)
#define TkpCmapStressed(tkwin,colormap) (0)
#define XFlush(display)
#define XGrabServer(display)
#define XUngrabServer(display)