OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [generic/] [tixInt.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
2
 * tixInt.h --
3
 *
4
 *      Defines internal data types and functions used by the Tix library.
5
 *
6
 * Copyright (c) 1996, Expert Interface Technologies
7
 *
8
 * See the file "license.terms" for information on usage and redistribution
9
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10
 *
11
 */
12
#ifndef _TIX_INT_H_
13
#define _TIX_INT_H_
14
 
15
#ifndef _TIX_H_
16
#include <tix.h>
17
#endif
18
 
19
#ifndef _TIX_PORT_H_
20
#include <tixPort.h>
21
#endif
22
 
23
#ifdef BUILD_tix
24
# undef TCL_STORAGE_CLASS
25
# define TCL_STORAGE_CLASS DLLEXPORT
26
#endif
27
 
28
/*----------------------------------------------------------------------
29
 *
30
 *              Tix Display Item Types
31
 *
32
 *----------------------------------------------------------------------
33
 */
34
 
35
#define TIX_DITEM_NONE                  0
36
#define TIX_DITEM_TEXT                  1
37
#define TIX_DITEM_IMAGETEXT             2
38
#define TIX_DITEM_WINDOW                3
39
#define TIX_DITEM_IMAGE                 4
40
 
41
/*
42
 * The flags for drawing DItems
43
 */
44
 
45
#define TIX_DITEM_NORMAL_BG             (0x1 <<  0)
46
#define TIX_DITEM_ACTIVE_BG             (0x1 <<  1)
47
#define TIX_DITEM_SELECTED_BG           (0x1 <<  2)
48
#define TIX_DITEM_DISABLED_BG           (0x1 <<  3)
49
#define TIX_DITEM_NORMAL_FG             (0x1 <<  4)
50
#define TIX_DITEM_ACTIVE_FG             (0x1 <<  5)
51
#define TIX_DITEM_SELECTED_FG           (0x1 <<  6)
52
#define TIX_DITEM_DISABLED_FG           (0x1 <<  7)
53
#define TIX_DITEM_FONT                  (0x1 <<  8)
54
#define TIX_DITEM_PADX                  (0x1 <<  9)
55
#define TIX_DITEM_PADY                  (0x1 << 10)
56
 
57
#if  0
58
    /*
59
     * %bordercolor not used
60
     */
61
#define TIX_DITEM_BORDER_COLOR          (0x1 << 11)
62
#define TIX_DITEM_BORDER_WIDTH          (0x1 << 12)
63
#define TIX_DITEM_RELIEF                (0x1 << 13)
64
#define TIX_DITEM_BOTTOM                (0x1 << 14)
65
#define TIX_DITEM_RIGHT                 (0x1 << 15)
66
#endif
67
 
68
#define TIX_DONT_CALL_CONFIG            TK_CONFIG_USER_BIT
69
 
70
/*
71
 * These values are used ONLY for indexing the color array in
72
 * Tix_StyleTemplate
73
 */
74
 
75
#define TIX_DITEM_NORMAL                0
76
#define TIX_DITEM_ACTIVE                1
77
#define TIX_DITEM_SELECTED              2
78
#define TIX_DITEM_DISABLED              3
79
 
80
/*
81
 * Flags for MultiInfo
82
 */
83
#define TIX_CONFIG_INFO                 1
84
#define TIX_CONFIG_VALUE                2
85
 
86
typedef union  Tix_DItem                Tix_DItem;
87
typedef union  Tix_DItemStyle           Tix_DItemStyle;
88
typedef struct Tix_DItemInfo            Tix_DItemInfo;
89
typedef struct Tix_DispData             Tix_DispData;
90
typedef struct Tix_StyleTemplate        Tix_StyleTemplate;
91
 
92
typedef void            Tix_DItemCalculateSizeProc  _ANSI_ARGS_((
93
                            Tix_DItem * iPtr));
94
typedef char *          Tix_DItemComponentProc _ANSI_ARGS_((
95
                            Tix_DItem * iPtr, int x, int y));
96
typedef int             Tix_DItemConfigureProc _ANSI_ARGS_((
97
                            Tix_DItem * iPtr, int argc, char ** argv,
98
                            int flags));
99
typedef Tix_DItem *     Tix_DItemCreateProc _ANSI_ARGS_((
100
                            Tix_DispData * ddPtr,
101
                            Tix_DItemInfo * diTypePtr));
102
typedef void            Tix_DItemDisplayProc  _ANSI_ARGS_((
103
                            Pixmap pixmap, GC gc, Tix_DItem * iPtr,
104
                            int x, int y, int width, int height, int flag));
105
typedef void            Tix_DItemFreeProc  _ANSI_ARGS_((Tix_DItem * diPtr));
106
typedef void            Tix_DItemSizeChangedProc  _ANSI_ARGS_((
107
                            Tix_DItem * iPtr));
108
 
109
typedef void            Tix_DItemStyleChangedProc  _ANSI_ARGS_((
110
                            Tix_DItem * iPtr));
111
typedef void            Tix_DItemLostStyleProc  _ANSI_ARGS_((
112
                            Tix_DItem * iPtr));
113
typedef int             Tix_DItemStyleConfigureProc _ANSI_ARGS_((
114
                            Tix_DItemStyle* style, int argc, char ** argv,
115
                            int flags));
116
typedef Tix_DItemStyle* Tix_DItemStyleCreateProc _ANSI_ARGS_((
117
                            Tcl_Interp * interp, Tk_Window tkwin,
118
                            Tix_DItemInfo * diTypePtr, char * name));
119
typedef void            Tix_DItemStyleFreeProc _ANSI_ARGS_((
120
                            Tix_DItemStyle* style));
121
typedef void            Tix_DItemStyleSetTemplateProc _ANSI_ARGS_((
122
                            Tix_DItemStyle* style,
123
                            Tix_StyleTemplate * tmplPtr));
124
 
125
/*
126
 * These are debugging routines
127
 */
128
 
129
typedef int             Tix_DItemRefCountProc _ANSI_ARGS_(());
130
typedef int             Tix_DItemStyleRefCountProc _ANSI_ARGS_(());
131
 
132
/*----------------------------------------------------------------------
133
 * Tix_DItemInfo --
134
 *
135
 *      This structure is used to register a new display item (call
136
 *      Tix_AddDItemType).
137
 *----------------------------------------------------------------------
138
 */
139
struct Tix_DItemInfo {
140
    char * name;
141
    int type;
142
 
143
    /*
144
     * These procedures communicate with the items
145
     */
146
    Tix_DItemCreateProc * createProc;
147
    Tix_DItemConfigureProc * configureProc;
148
    Tix_DItemCalculateSizeProc * calculateSizeProc;
149
    Tix_DItemComponentProc * componentProc;
150
    Tix_DItemDisplayProc * displayProc;
151
    Tix_DItemFreeProc * freeProc;
152
    Tix_DItemStyleChangedProc *styleChangedProc;
153
    Tix_DItemLostStyleProc * lostStyleProc;
154
 
155
    /*
156
     * These procedures communicate with the styles
157
     */
158
    Tix_DItemStyleCreateProc * styleCreateProc;
159
    Tix_DItemStyleConfigureProc * styleConfigureProc;
160
    Tix_DItemStyleFreeProc * styleFreeProc;
161
    Tix_DItemStyleSetTemplateProc * styleSetTemplateProc;
162
 
163
    Tk_ConfigSpec * itemConfigSpecs;
164
    Tk_ConfigSpec * styleConfigSpecs;
165
    struct Tix_DItemInfo * next;
166
};
167
 
168
/*----------------------------------------------------------------------
169
 * Tix_DispData --
170
 *
171
 *      Information needed by the display types to display the item in
172
 *      an X drawable.
173
 *----------------------------------------------------------------------
174
 */
175
struct Tix_DispData {
176
    Display * display;
177
    Tcl_Interp * interp;
178
    Tk_Window tkwin;
179
    Tix_DItemSizeChangedProc * sizeChangedProc;
180
};
181
 
182
/*----------------------------------------------------------------------
183
 * Tix_StyleTemplate --
184
 *
185
 *      A StyleTemplate is used to set the values of the default styles
186
 *      associated with a widget
187
 *----------------------------------------------------------------------
188
 */
189
struct Tix_StyleTemplate {
190
    int flags;                  /* determines which field is valid */
191
 
192
    struct {
193
        XColor * bg;
194
        XColor * fg;
195
    } colors[4];                /* colors for the four basic modes*/
196
 
197
    int pad[2];
198
#if 0
199
    /* %bordercolor not used */
200
    XColor * borderColor;
201
    Tix_Relief relief;
202
    int borderWidth;
203
#endif
204
    TixFont font;
205
};
206
 
207
/*----------------------------------------------------------------------
208
 *
209
 *
210
 *                      Display Item Types
211
 *
212
 *
213
 *----------------------------------------------------------------------
214
 */
215
 
216
/*
217
 *  Display Styles
218
 */
219
typedef struct TixBaseStyle             TixBaseStyle;
220
typedef struct TixImageTextStyle        TixImageTextStyle;
221
typedef struct TixImageStyle            TixImageStyle;
222
typedef struct TixTextStyle             TixTextStyle;
223
typedef struct TixWindowStyle           TixWindowStyle;
224
 
225
typedef struct TixBaseItem              TixBaseItem;
226
typedef struct TixColorStyle            TixColorStyle;
227
typedef struct TixImageTextItem         TixImageTextItem;
228
typedef struct TixImageItem             TixImageItem;
229
typedef struct TixTextItem              TixTextItem;
230
typedef struct TixWindowItem            TixWindowItem;
231
 
232
/*----------------------------------------------------------------------
233
 * TixBaseItem --
234
 *
235
 *      This is the abstract base class for all display items. All
236
 *      display items should have the data members defined in the
237
 *      BaseItem structure
238
 *----------------------------------------------------------------------
239
 */
240
#define ITEM_COMMON_MEMBERS \
241
    Tix_DItemInfo * diTypePtr; \
242
    Tix_DispData * ddPtr; \
243
    ClientData clientData; \
244
    int size[2]                 /* Size of this element */ \
245
 
246
struct TixBaseItem {
247
    ITEM_COMMON_MEMBERS;
248
    TixBaseStyle * stylePtr;
249
};
250
 
251
/*----------------------------------------------------------------------
252
 * TixBaseStyle --
253
 *
254
 *      This is the abstract base class for all display styles. All
255
 *      display items should have the data members defined in the
256
 *      BaseStyle structure.  The common members are initialized by
257
 *      tixDiStyle.c
258
 *
259
 *----------------------------------------------------------------------
260
 */
261
 
262
#define STYLE_COMMON_MEMBERS \
263
    Tcl_Command styleCmd;       /* Token for style's command. */ \
264
    Tcl_HashTable items;        /* Ditems affected by this style */ \
265
    int refCount;               /* Number of ditems affected by this style */\
266
    int flags;                  /* Various attributes */ \
267
    Tcl_Interp *interp;         /* Interpreter associated with style. */ \
268
    Tk_Window tkwin;            /* Window associated with this style */ \
269
    Tix_DItemInfo * diTypePtr; \
270
    Tk_Anchor anchor;           /* Anchor information */ \
271
    char * name;                /* Name of this style */ \
272
    int pad[2]                  /* paddings */
273
 
274
 
275
#if 0
276
    Tix_Relief relief
277
    /* %bordercolor not used */
278
    int borderWidth;
279
    XColor * borderColor;       /* color of the border when it is displayed
280
                                 * in "flat border" mode
281
                                 */
282
    GC borderGC
283
#endif
284
 
285
#define STYLE_COLOR_MEMBERS \
286
    struct { \
287
        XColor * bg; \
288
        XColor * fg; \
289
        GC foreGC;   \
290
        GC backGC;   \
291
    } colors[4]                 /* colors and GC's for the four basic modes*/
292
 
293
struct TixBaseStyle {
294
    STYLE_COMMON_MEMBERS;
295
};
296
 
297
#define TIX_STYLE_DELETED 1
298
#define TIX_STYLE_DEFAULT 2
299
 
300
/*
301
 * Abstract type for all styles that have a color element
302
 */
303
struct TixColorStyle {
304
    STYLE_COMMON_MEMBERS;
305
    STYLE_COLOR_MEMBERS;
306
};
307
 
308
/*----------------------------------------------------------------------
309
 * ImageTextItem --
310
 *
311
 *      Display an image together with a text string
312
 *----------------------------------------------------------------------
313
 */
314
struct TixImageTextItem {
315
    ITEM_COMMON_MEMBERS;
316
 
317
    TixImageTextStyle *stylePtr;
318
        /*-------------------------*/
319
        /*       Bitmap            */
320
        /*-------------------------*/
321
    Pixmap bitmap;
322
    int bitmapW, bitmapH;       /* Size of bitmap */
323
 
324
        /*-------------------------*/
325
        /*       Image             */
326
        /*-------------------------*/
327
    char *imageString;          /* Name of image to display (malloc'ed), or
328
                                 * NULL.  If non-NULL, bitmap, text, and
329
                                 * textVarName are ignored. */
330
    Tk_Image image;
331
    int imageW, imageH;         /* Size of image */
332
 
333
        /*-------------------------*/
334
        /*       Text             */
335
        /*-------------------------*/
336
 
337
    char * text;                /* Show descriptive text */
338
    size_t numChars;            /* Size of text */
339
    int textW, textH;
340
    int wrapLength;
341
    Tk_Justify justify;         /* Justification to use for multi-line text. */
342
    int underline;              /* Index of character to underline.  < 0 means
343
                                 * don't underline anything. */
344
 
345
    int showImage, showText;
346
};
347
 
348
struct TixImageTextStyle {
349
    STYLE_COMMON_MEMBERS;
350
    STYLE_COLOR_MEMBERS;
351
    int wrapLength;
352
    Tk_Justify justify;         /* Justification to use for multi-line text. */
353
    TixFont font;
354
    int gap;                    /* Gap between text and image */
355
};
356
 
357
/*----------------------------------------------------------------------
358
 * ImageItem --
359
 *
360
 *      Displays an image
361
 *----------------------------------------------------------------------
362
 */
363
struct TixImageItem {
364
    ITEM_COMMON_MEMBERS;
365
 
366
    TixImageStyle *stylePtr;
367
 
368
        /*-------------------------*/
369
        /*       Image             */
370
        /*-------------------------*/
371
    char *imageString;          /* Name of image to display (malloc'ed), or
372
                                 * NULL.  If non-NULL, bitmap, text, and
373
                                 * textVarName are ignored. */
374
    Tk_Image image;
375
    int imageW, imageH;         /* Size of image */
376
};
377
 
378
struct TixImageStyle {
379
    STYLE_COMMON_MEMBERS;
380
    STYLE_COLOR_MEMBERS;
381
};
382
/*----------------------------------------------------------------------
383
 * TextItem --
384
 *
385
 *      Displays a text string.
386
 *----------------------------------------------------------------------
387
 */
388
struct TixTextItem {
389
    ITEM_COMMON_MEMBERS;
390
 
391
    TixTextStyle *stylePtr;
392
        /*-------------------------*/
393
        /*       Text             */
394
        /*-------------------------*/
395
 
396
    char * text;                /* Show descriptive text */
397
    size_t numChars;            /* Size of text */
398
    int textW, textH;
399
    int underline;              /* Index of character to underline.  < 0 means
400
                                 * don't underline anything. */
401
};
402
 
403
struct TixTextStyle {
404
    STYLE_COMMON_MEMBERS;
405
    STYLE_COLOR_MEMBERS;
406
    int wrapLength;
407
    Tk_Justify justify;         /* Justification to use for multi-line text. */
408
    TixFont font;
409
};
410
 
411
/*----------------------------------------------------------------------
412
 * WindowItem --
413
 *
414
 *      Displays a window.
415
 *----------------------------------------------------------------------
416
 */
417
struct TixWindowItem {
418
    ITEM_COMMON_MEMBERS;
419
    TixWindowStyle *stylePtr;
420
    Tk_Window tkwin;
421
    struct TixWindowItem * next;
422
    int serial;
423
};
424
 
425
struct TixWindowStyle {
426
    STYLE_COMMON_MEMBERS;
427
};
428
 
429
/*----------------------------------------------------------------------
430
 * Tix_DItem and Tix_DItemStyle --
431
 *
432
 *      These unions just make it easy to address the internals of the
433
 *      structures of the display items and styles. If you create a new
434
 *      display item, you will need to do you type casting yourself.
435
 *----------------------------------------------------------------------
436
 */
437
union Tix_DItem {
438
    TixBaseItem         base;
439
    TixImageTextItem    imagetext;
440
    TixTextItem         text;
441
    TixWindowItem       window;
442
    TixImageItem        image;
443
};
444
 
445
union Tix_DItemStyle {
446
    TixBaseStyle        base;
447
    TixColorStyle       color;
448
    TixImageTextStyle   imagetext;
449
    TixTextStyle        text;
450
    TixWindowStyle      window;
451
    TixImageStyle       image;
452
};
453
 
454
#define Tix_DItemType(x)        ((x)->base.diTypePtr->type)
455
#define Tix_DItemTypeName(x)    ((x)->base.diTypePtr->name)
456
#define Tix_DItemWidth(x)       ((x)->base.size[0])
457
#define Tix_DItemHeight(x)      ((x)->base.size[1])
458
#define Tix_DItemConfigSpecs(x) ((x)->base.diTypePtr->itemConfigSpecs)
459
#define Tix_DItemPadX(x)        ((x)->base.stylePtr->pad[0])
460
#define Tix_DItemPadY(x)        ((x)->base.stylePtr->pad[1])
461
 
462
#define TIX_WIDTH  0
463
#define TIX_HEIGHT 1
464
 
465
/*----------------------------------------------------------------------
466
 * Tix_ArgumentList --
467
 *
468
 *      This data structure is used to split command arguments for
469
 *      the display item types
470
 *----------------------------------------------------------------------
471
 */
472
#define FIXED_SIZE 4
473
typedef struct {
474
    int argc;
475
    char ** argv;
476
} Tix_Argument;
477
 
478
typedef struct {
479
    Tix_Argument * arg;
480
    int numLists;
481
    Tix_Argument preAlloc[FIXED_SIZE];
482
} Tix_ArgumentList;
483
 
484
/*----------------------------------------------------------------------
485
 * Tix_ScrollInfo --
486
 *
487
 *      This data structure encapsulates all the necessary operations
488
 *      for scrolling widgets
489
 *----------------------------------------------------------------------
490
 */
491
#define TIX_SCROLL_INT          1
492
#define TIX_SCROLL_DOUBLE       2
493
 
494
/* abstract type */
495
typedef struct Tix_ScrollInfo {
496
    int type;           /* TIX_SCROLL_INT or TIX_SCROLL_DOUBLE */
497
    char * command;
498
} Tix_ScrollInfo;
499
 
500
typedef struct Tix_IntScrollInfo {
501
    int type;           /* TIX_SCROLL_INT */
502
    char * command;
503
 
504
    int total;          /* total size (width or height) of the widget*/
505
    int window;         /* visible size */
506
    int offset;         /* The top/left side of the scrolled widget */
507
    int unit;           /* How much should we scroll when the user
508
                         * press the arrow on a scrollbar? */
509
 
510
} Tix_IntScrollInfo;
511
 
512
typedef struct Tix_DoubleScrollInfo {
513
    int type;           /* TIX_SCROLL_DOUBLE */
514
    char * command;
515
 
516
    double total;       /* total size (width or height) of the widget*/
517
    double window;      /* visible size */
518
    double offset;      /* The top/left side of the scrolled widget */
519
    double unit;        /* How much should we scroll when the user
520
                         * press the arrow on a scrollbar? */
521
} Tix_DoubleScrollInfo;
522
 
523
/*----------------------------------------------------------------------
524
 *
525
 *              Global variables
526
 *
527
 * Should be used only in the Tix library. Some systems don't support
528
 * exporting of global variables from shared libraries.
529
 *
530
 *----------------------------------------------------------------------
531
 */
532
EXTERN Tk_Uid tixNormalUid;
533
EXTERN Tk_Uid tixDisabledUid;
534
EXTERN Tk_Uid tixCellUid;
535
EXTERN Tk_Uid tixRowUid;
536
EXTERN Tk_Uid tixColumnUid;
537
 
538
#define FLAG_READONLY   0
539
#define FLAG_STATIC     1
540
#define FLAG_FORCECALL  2
541
 
542
/*----------------------------------------------------------------------
543
 *
544
 *
545
 *                  MEGA-WIDGET CONFIG HANDLING
546
 *
547
 *
548
 *----------------------------------------------------------------------
549
 */
550
typedef struct _TixConfigSpec           TixConfigSpec;
551
typedef struct _TixConfigAlias          TixConfigAlias;
552
typedef struct _TixClassRecord          TixClassRecord;
553
 
554
struct _TixConfigSpec {
555
    unsigned int isAlias        : 1;
556
    unsigned int readOnly       : 1;
557
    unsigned int isStatic       : 1;
558
    unsigned int forceCall      : 1;
559
 
560
    char * argvName;
561
    char * defValue;
562
 
563
    char * dbName;              /* The additional parts of a */
564
    char * dbClass;             /* TixWidgetConfigSpec structure */
565
 
566
    char *verifyCmd;
567
 
568
    TixConfigSpec * realPtr;    /* valid only if this option is an alias */
569
};
570
 
571
/*
572
 * Controls the access of root widget and subwidget commands and options
573
 */
574
typedef struct _Tix_ExportSpec {
575
    Tix_LinkList exportCmds;
576
    Tix_LinkList restrictCmds;
577
    Tix_LinkList exportOpts;
578
    Tix_LinkList restrictOpts;
579
} Tix_ExportSpec;
580
 
581
typedef struct _Tix_SubWidgetSpec {
582
    struct _Tix_SubWidgetSpec * next;
583
    char * name;
584
    Tix_ExportSpec export;
585
} Tix_SubWidgetSpec;
586
 
587
typedef struct _Tix_StringLink {
588
    struct _Tix_StringLink *next;
589
    char * string;
590
} Tix_StringLink;
591
 
592
typedef struct _Tix_SubwidgetDef {
593
    struct _TixSubwidgetDef * next;
594
    char * spec;
595
    char * value;
596
} Tix_SubwidgetDef;
597
 
598
typedef struct _TixClassParseStruct {
599
    char * alias;
600
    char * ClassName;
601
    char * configSpec;
602
    char * def;
603
    char * flag;
604
    char * forceCall;
605
    char * method;
606
    char * readOnly;
607
    char * isStatic;
608
    char * superClass;
609
    char * subWidget;
610
    char * isVirtual;
611
 
612
    int     optArgc;
613
    char ** optArgv;
614
} TixClassParseStruct;
615
 
616
struct _TixClassRecord {
617
    TixClassRecord    * next;           /* Chains to the next class record in
618
                                         * a superClass's unInitSubCls list */
619
    TixClassRecord    * superClass;     /* The superclass of this class. Is
620
                                         * NULL if this class does not have
621
                                         * a superclass. */
622
    unsigned int        isWidget;       /* TRUE iff this class is created by
623
                                         * the "tixWidgetClass" command */
624
    char              * className;      /* Instiantiation command */
625
    char              * ClassName;      /* used in TK option database */
626
 
627
    int                 nSpecs;
628
    TixConfigSpec    ** specs;
629
    int                 nMethods;
630
    char             ** methods;
631
    Tk_Window           mainWindow;     /* This variable is essentially
632
                                         * a cached variable so that
633
                                         * we can advoid calling
634
                                         * Tk_MainWindow() */
635
    int                 isVirtual;      /* is this a virtual base class
636
                                         * (shouldn't be instantiated)*/
637
    TixClassParseStruct*parsePtr;       /* Information supplied by the
638
                                         * tixClass or tixWidgetClass
639
                                         * commands */
640
    Tix_LinkList        unInitSubCls;   /* The subclasses that have not been
641
                                         * initialized. */
642
    int                 initialized;    /* Is this class initialized? A class
643
                                         * is not initialized if it has been
644
                                         * defined but some its superclass
645
                                         * is not initialized.
646
                                         */
647
    Tix_LinkList        subWDefs;       /* the -defaults option */
648
#if USE_ACCESS_CONTROL
649
    Tix_LinkList        subWidgets;
650
    Tix_ExportSpec      exportSpec;     /* controls the export status
651
                                         * of the commands and options
652
                                         * of the root widget */
653
#endif
654
};
655
 
656
typedef struct _TixInterpState {
657
    char * result;
658
    char * errorInfo;
659
    char * errorCode;
660
} TixInterpState;
661
 
662
/*----------------------------------------------------------------------
663
 *
664
 *              Internal procedures
665
 *
666
 *----------------------------------------------------------------------
667
 */
668
 
669
EXTERN int              Tix_CallConfigMethod _ANSI_ARGS_((
670
                            Tcl_Interp *interp, TixClassRecord *cPtr,
671
                            char * widRec, TixConfigSpec *spec, char * value));
672
EXTERN int              Tix_CallMethod _ANSI_ARGS_((Tcl_Interp *interp,
673
                            char *context, char *widRec, char *method,
674
                            int argc, char **argv));
675
EXTERN int              Tix_ChangeOneOption _ANSI_ARGS_((
676
                            Tcl_Interp *interp, TixClassRecord *cPtr,
677
                            char * widRec, TixConfigSpec *spec, char * value,
678
                            int isDefault, int isInit));
679
EXTERN int              Tix_ChangeOptions _ANSI_ARGS_((
680
                            Tcl_Interp *interp, TixClassRecord *cPtr,
681
                            char * widRec, int argc, char ** argv));
682
EXTERN TixConfigSpec *  Tix_FindConfigSpecByName _ANSI_ARGS_((
683
                            Tcl_Interp * interp,
684
                            TixClassRecord * cPtr, char * name));
685
EXTERN char  *          Tix_FindMethod _ANSI_ARGS_((Tcl_Interp *interp,
686
                            char *context, char *method));
687
EXTERN char *           Tix_FindPublicMethod _ANSI_ARGS_((
688
                            Tcl_Interp *interp, TixClassRecord * cPtr,
689
                            char * method));
690
EXTERN int              Tix_GetChars _ANSI_ARGS_((Tcl_Interp *interp,
691
                            char *string, double *doublePtr));
692
EXTERN char  *          Tix_GetConfigSpecFullName _ANSI_ARGS_((char *clasRec,
693
                            char *flag));
694
EXTERN char *           Tix_GetContext _ANSI_ARGS_((
695
                            Tcl_Interp * interp, char * widRec));
696
EXTERN char  *          Tix_GetMethodFullName _ANSI_ARGS_((char *context,
697
                            char *method));
698
EXTERN void             Tix_GetPublicMethods _ANSI_ARGS_((Tcl_Interp *interp,
699
                            char *widRec, int *numMethods,
700
                            char *** validMethods));
701
EXTERN int              Tix_GetWidgetOption _ANSI_ARGS_((
702
                            Tcl_Interp *interp, Tk_Window tkwin,
703
                            char *argvName, char *dbName, char *dbClass,
704
                            char *defValue, int argc, char **argv,
705
                            int type, char *ptr));
706
EXTERN int              Tix_GetVar _ANSI_ARGS_((
707
                            Tcl_Interp *interp, TixClassRecord *cPtr,
708
                            char * widRec, char * flag));
709
EXTERN int              Tix_QueryAllOptions _ANSI_ARGS_((
710
                            Tcl_Interp *interp, TixClassRecord * cPtr,
711
                            char *widRec));
712
EXTERN int              Tix_QueryOneOption _ANSI_ARGS_((
713
                            Tcl_Interp *interp, TixClassRecord *cPtr,
714
                            char *widRec, char *flag));
715
EXTERN int              Tix_SuperClass _ANSI_ARGS_((Tcl_Interp *interp,
716
                            char *widClass, char ** superClass_ret));
717
EXTERN int              Tix_UnknownPublicMethodError _ANSI_ARGS_((
718
                            Tcl_Interp *interp, TixClassRecord * cPtr,
719
                            char * widRec, char * method));
720
EXTERN int              Tix_ValueMissingError _ANSI_ARGS_((Tcl_Interp *interp,
721
                            char *spec));
722
EXTERN void             Tix_AddDItemType _ANSI_ARGS_((
723
                            Tix_DItemInfo * diTypePtr));
724
EXTERN int              Tix_ConfigureInfo2 _ANSI_ARGS_((
725
                            Tcl_Interp *interp, Tk_Window tkwin,
726
                            char *entRec, Tk_ConfigSpec *entConfigSpecs,
727
                            Tix_DItem * iPtr, char *argvName, int flags));
728
EXTERN int              Tix_ConfigureValue2 _ANSI_ARGS_((Tcl_Interp *interp,
729
                            Tk_Window tkwin, char * entRec,
730
                            Tk_ConfigSpec *entConfigSpecs, Tix_DItem * iPtr,
731
                            char *argvName, int flags));
732
EXTERN void             Tix_DItemCalculateSize _ANSI_ARGS_((
733
                            Tix_DItem * iPtr));
734
EXTERN char *           Tix_DItemComponent _ANSI_ARGS_((Tix_DItem * diPtr,
735
                            int x, int y));
736
EXTERN int              Tix_DItemConfigure _ANSI_ARGS_((
737
                            Tix_DItem * diPtr, int argc,
738
                            char ** argv, int flags));
739
EXTERN Tix_DItem *      Tix_DItemCreate _ANSI_ARGS_((Tix_DispData * ddPtr,
740
                            char * type));
741
EXTERN void             Tix_DItemDrawBackground _ANSI_ARGS_((
742
                            Pixmap pixmap, GC gc, Tix_DItem * iPtr,
743
                            int x, int y, int width, int height, int flags));
744
EXTERN void             Tix_DItemDisplay _ANSI_ARGS_((
745
                            Pixmap pixmap, GC gc, Tix_DItem * iPtr,
746
                            int x, int y, int width, int height, int flag));
747
EXTERN void             Tix_DItemFree _ANSI_ARGS_((
748
                            Tix_DItem * iPtr));
749
EXTERN void             TixDItemStyleChanged _ANSI_ARGS_((
750
                            Tix_DItemInfo * diTypePtr,
751
                            Tix_DItemStyle * stylePtr));
752
EXTERN void             TixDItemStyleFree  _ANSI_ARGS_((Tix_DItem *iPtr,
753
                            Tix_DItemStyle * stylePtr));
754
EXTERN void             TixDItemGetAnchor _ANSI_ARGS_((Tk_Anchor anchor,
755
                            int x, int y, int cav_w, int cav_h,
756
                            int width, int height, int * x_ret, int * y_ret));
757
EXTERN void             Tix_FreeArgumentList _ANSI_ARGS_((
758
                            Tix_ArgumentList *argListPtr));
759
EXTERN void             TixGetColorDItemGC _ANSI_ARGS_((
760
                            Tix_DItem * iPtr, GC * backGC_ret,
761
                            GC * foreGC_ret, int flags));
762
EXTERN Tix_DItemStyle*  TixGetDefaultDItemStyle _ANSI_ARGS_((
763
                            Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr,
764
                            Tix_DItem *iPtr, Tix_DItemStyle* oldStylePtr));
765
EXTERN Tix_DItemInfo *  Tix_GetDItemType _ANSI_ARGS_((
766
                            Tcl_Interp * interp, char *type));
767
EXTERN void             Tix_GetScrollFractions _ANSI_ARGS_((
768
                            Tix_ScrollInfo * siPtr,
769
                            double * first_ret, double * last_ret));
770
EXTERN void             Tix_InitScrollInfo  _ANSI_ARGS_((
771
                            Tix_ScrollInfo * siPtr, int type));
772
EXTERN int              Tix_MultiConfigureInfo _ANSI_ARGS_((
773
                            Tcl_Interp * interp,
774
                            Tk_Window tkwin, Tk_ConfigSpec **specsList,
775
                            int numLists, char **widgRecList, char *argvName,
776
                            int flags, int request));
777
EXTERN void             Tix_SetDefaultStyleTemplate _ANSI_ARGS_((
778
                            Tk_Window tkwin, Tix_StyleTemplate * tmplPtr));
779
EXTERN int              Tix_SetScrollBarView _ANSI_ARGS_((
780
                            Tcl_Interp *interp, Tix_ScrollInfo * siPtr,
781
                            int argc, char **argv, int compat));
782
EXTERN void             Tix_SetWindowItemSerial _ANSI_ARGS_((
783
                            Tix_LinkList * lPtr, Tix_DItem * iPtr,
784
                            int serial));
785
EXTERN int              Tix_SplitConfig _ANSI_ARGS_((Tcl_Interp * interp,
786
                            Tk_Window tkwin, Tk_ConfigSpec  ** specsList,
787
                            int numLists, int argc, char ** argv,
788
                            Tix_ArgumentList * argListPtr));
789
EXTERN void             Tix_UnmapInvisibleWindowItems _ANSI_ARGS_((
790
                            Tix_LinkList * lPtr, int serial));
791
EXTERN void             Tix_UpdateScrollBar  _ANSI_ARGS_((
792
                            Tcl_Interp *interp, Tix_ScrollInfo * siPtr));
793
EXTERN int              Tix_WidgetConfigure2 _ANSI_ARGS_((
794
                            Tcl_Interp *interp, Tk_Window tkwin, char * entRec,
795
                            Tk_ConfigSpec *entConfigSpecs,
796
                            Tix_DItem * iPtr, int argc, char ** argv,
797
                            int flags, int forced, int * sizeChanged_ret));
798
EXTERN void             Tix_WindowItemListRemove  _ANSI_ARGS_((
799
                            Tix_LinkList * lPtr, Tix_DItem * iPtr));
800
 
801
typedef struct _TixpSubRegion TixpSubRegion;
802
 
803
/*
804
 * Functions that should be used by Tix only. Functions prefixed by "Tix"
805
 * are generic functions that has one implementation for all platforms.
806
 * Functions prefixed with "Tixp" requires one implementation on each
807
 * platform.
808
 */
809
 
810
EXTERN int              TixInitSam _ANSI_ARGS_((Tcl_Interp * interp));
811
EXTERN int              TixLoadLibrary _ANSI_ARGS_((Tcl_Interp * interp));
812
EXTERN void             TixRestoreInterpState _ANSI_ARGS_((
813
                            Tcl_Interp * interp, TixInterpState * statePtr));
814
EXTERN void             TixSaveInterpState _ANSI_ARGS_((Tcl_Interp * interp,
815
                            TixInterpState * statePtr));
816
 
817
EXTERN void             TixpDrawAnchorLines _ANSI_ARGS_((Display *display,
818
                            Drawable drawable, GC gc, int x, int y,
819
                            int w, int h));
820
EXTERN void             TixpDrawTmpLine _ANSI_ARGS_((int x1, int y1,
821
                            int x2, int y2, Tk_Window tkwin));
822
EXTERN void             TixpEndSubRegionDraw _ANSI_ARGS_((Display *display,
823
                             Drawable drawable, GC gc,
824
                             TixpSubRegion * subRegPtr));
825
EXTERN int              TixpSetWindowParent _ANSI_ARGS_((Tcl_Interp * interp,
826
                            Tk_Window tkwin, Tk_Window newParent,
827
                            int parentId));
828
EXTERN void             TixpStartSubRegionDraw _ANSI_ARGS_((Display *display,
829
                             Drawable drawable, GC gc,
830
                             TixpSubRegion * subRegPtr, int origX,
831
                             int origY, int x, int y, int width, int height,
832
                             int needWidth, int needHeight));
833
EXTERN void             TixpSubRegDisplayText _ANSI_ARGS_((Display *display,
834
                            Drawable drawable, GC gc,
835
                            TixpSubRegion * subRegPtr,
836
                            TixFont font, char *string,
837
                            int numChars, int x, int y, int length,
838
                            Tk_Justify justify, int underline));
839
EXTERN void             TixpSubRegDrawBitmap _ANSI_ARGS_((Display *display,
840
                            Drawable drawable, GC gc,
841
                            TixpSubRegion * subRegPtr, Pixmap bitmap,
842
                            int src_x, int src_y, int width, int height,
843
                            int dest_x, int dest_y, unsigned long plane));
844
EXTERN void             TixpSubRegDrawImage _ANSI_ARGS_((
845
                            TixpSubRegion * subRegPtr, Tk_Image image,
846
                            int imageX, int imageY, int width, int height,
847
                            Drawable drawable, int drawableX, int drawableY));
848
EXTERN void             TixpSubRegFillRectangle _ANSI_ARGS_((Display *display,
849
                            Drawable drawable, GC gc,
850
                            TixpSubRegion * subRegPtr, int x, int y,
851
                            int width, int height));
852
 
853
 
854
/*
855
 * Console Stuff
856
 */
857
 
858
#if ((TCL_MAJOR_VERSION == 7) && (TCL_MINOR_VERSION == 5))
859
 
860
/*
861
 * The TixConsole stuff was implemented for Tcl 7.5 only
862
 */
863
 
864
extern void             TixConsoleCreate _ANSI_ARGS_((Tcl_Interp *interp));
865
extern int              TixConsoleInit _ANSI_ARGS_((Tcl_Interp *interp));
866
 
867
#else
868
 
869
extern void             TkConsoleCreate _ANSI_ARGS_((void));
870
extern int              TkConsoleInit _ANSI_ARGS_((Tcl_Interp *interp));
871
 
872
#define TixConsoleCreate(x)     TkConsoleCreate()
873
#define TixConsoleInit(x)       TkConsoleInit(x)
874
 
875
#endif
876
 
877
#undef TCL_STORAGE_CLASS
878
#define TCL_STORAGE_CLASS DLLIMPORT
879
 
880
#endif /* _TIX_INT_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.