diff options
Diffstat (limited to 'generic/ttk/ttkTheme.h')
-rw-r--r-- | generic/ttk/ttkTheme.h | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h index ff18da8..12a471e 100644 --- a/generic/ttk/ttkTheme.h +++ b/generic/ttk/ttkTheme.h @@ -1,10 +1,7 @@ -/* - * ttkTheme.h -- - * Declarations for Tk style engine. - * +/* $Id: ttkTheme.h,v 1.8 2006/12/14 19:51:04 jenglish Exp $ * Copyright (c) 2003 Joe English. Freely redistributable. * - * $Id: ttkTheme.h,v 1.7 2006/12/13 05:36:38 jenglish Exp $ + * Declarations for Tk theme engine. */ #ifndef _TTKTHEME @@ -14,13 +11,6 @@ extern "C" { #endif -#if defined(BUILD_ttk) -# define TTKAPI DLLEXPORT -# undef USE_TTK_STUBS -#else -# define TTKAPI DLLIMPORT -#endif - #ifndef MODULE_SCOPE # ifdef __cplusplus # define MODULE_SCOPE extern "C" @@ -29,6 +19,8 @@ extern "C" { # endif #endif +#define TTKAPI MODULE_SCOPE + /* Ttk syncs to the Tk version & patchlevel */ #define TTK_VERSION TK_VERSION #define TTK_PATCH_LEVEL TK_PATCH_LEVEL @@ -170,7 +162,7 @@ typedef unsigned int Ttk_Sticky; #define TTK_FILL_BOTH (0xF) /* -sticky nswe */ TTKAPI int Ttk_GetStickyFromObj(Tcl_Interp *, Tcl_Obj *, Ttk_Sticky *); -MODULE_SCOPE Tcl_Obj *Ttk_NewStickyObj(Ttk_Sticky); +TTKAPI Tcl_Obj *Ttk_NewStickyObj(Ttk_Sticky); /* * Extra bits for position specifications (combine -side and -sticky) @@ -195,14 +187,13 @@ typedef unsigned int Ttk_PositionSpec; /* See below */ #define _TTK_MASK_STICK (0x0F) /* See Ttk_UnparseLayout() */ #define _TTK_MASK_PACK (0xF0) /* See Ttk_UnparseLayout(), packStrings */ - TTKAPI Ttk_Box Ttk_PackBox(Ttk_Box *cavity, int w, int h, Ttk_Side side); TTKAPI Ttk_Box Ttk_StickBox(Ttk_Box parcel, int w, int h, Ttk_Sticky sticky); TTKAPI Ttk_Box Ttk_AnchorBox(Ttk_Box parcel, int w, int h, Tk_Anchor anchor); TTKAPI Ttk_Box Ttk_PadBox(Ttk_Box b, Ttk_Padding p); TTKAPI Ttk_Box Ttk_ExpandBox(Ttk_Box b, Ttk_Padding p); TTKAPI Ttk_Box Ttk_PlaceBox(Ttk_Box *cavity, int w,int h, Ttk_Side,Ttk_Sticky); -MODULE_SCOPE Ttk_Box Ttk_PositionBox(Ttk_Box *cavity, int w, int h, Ttk_PositionSpec); +TTKAPI Ttk_Box Ttk_PositionBox(Ttk_Box *cavity, int w, int h, Ttk_PositionSpec); /*------------------------------------------------------------------------ * +++ Themes. @@ -241,7 +232,7 @@ typedef void (Ttk_ElementSizeProc)(void *clientData, void *elementRecord, typedef void (Ttk_ElementDrawProc)(void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state); -typedef struct Ttk_ElementOptionSpec +typedef struct Ttk_ElementOptionSpec { char *optionName; /* Command-line name of the widget option */ Tk_OptionType type; /* Accepted option types */ @@ -253,7 +244,7 @@ typedef struct Ttk_ElementOptionSpec typedef struct Ttk_ElementSpec { enum TTKStyleVersion2 version; /* Version of the style support. */ - size_t elementSize; /* Size of element record */ + size_t elementSize; /* Size of element record */ Ttk_ElementOptionSpec *options; /* List of options, NULL-terminated */ Ttk_ElementSizeProc *size; /* Compute min size and padding */ Ttk_ElementDrawProc *draw; /* Draw the element */ @@ -360,9 +351,9 @@ MODULE_SCOPE void Ttk_RegisterNamedColor(Ttk_ResourceCache, const char *, XColor */ typedef struct TtkImageSpec Ttk_ImageSpec; -extern Ttk_ImageSpec *TtkGetImageSpec(Tcl_Interp *, Tk_Window, Tcl_Obj *); -extern void TtkFreeImageSpec(Ttk_ImageSpec *); -extern Tk_Image TtkSelectImage(Ttk_ImageSpec *, Ttk_State); +TTKAPI Ttk_ImageSpec *TtkGetImageSpec(Tcl_Interp *, Tk_Window, Tcl_Obj *); +TTKAPI void TtkFreeImageSpec(Ttk_ImageSpec *); +TTKAPI Tk_Image TtkSelectImage(Ttk_ImageSpec *, Ttk_State); /*------------------------------------------------------------------------ * +++ Miscellaneous enumerations. @@ -375,7 +366,7 @@ typedef enum /* -default option values */ TTK_BUTTON_DEFAULT_DISABLED /* not defaultable */ } Ttk_ButtonDefaultState; -MODULE_SCOPE int Ttk_GetButtonDefaultStateFromObj(Tcl_Interp *, Tcl_Obj *, int *); +TTKAPI int Ttk_GetButtonDefaultStateFromObj(Tcl_Interp *, Tcl_Obj *, int *); typedef enum /* -compound option values */ { @@ -389,11 +380,11 @@ typedef enum /* -compound option values */ TTK_COMPOUND_RIGHT /* image to right of text */ } Ttk_Compound; -MODULE_SCOPE int Ttk_GetCompoundFromObj(Tcl_Interp *, Tcl_Obj *, int *); +TTKAPI int Ttk_GetCompoundFromObj(Tcl_Interp *, Tcl_Obj *, int *); typedef enum { /* -orient option values */ TTK_ORIENT_HORIZONTAL, - TTK_ORIENT_VERTICAL + TTK_ORIENT_VERTICAL } Ttk_Orient; /*------------------------------------------------------------------------ |