Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / classes / zune / betterstring / mcc / private.h
blob2c131be8eb9e3989658a5e5f66f2db813e37efad
1 /***************************************************************************
3 BetterString.mcc - A better String gadget MUI Custom Class
4 Copyright (C) 1997-2000 Allan Odgaard
5 Copyright (C) 2005 by BetterString.mcc Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/
19 $Id$
21 ***************************************************************************/
23 #ifndef BETTERSTRING_MCC_PRIV_H
24 #define BETTERSTRING_MCC_PRIV_H
26 #include <dos/exall.h>
27 #include <exec/types.h>
28 #include <intuition/classusr.h>
29 #include <libraries/mui.h>
31 #ifndef __AROS__
32 #include <muiextra.h>
33 #endif
34 #include <mcc_common.h>
35 #include <mcc_debug.h>
37 #include "BetterString_mcc.h"
39 struct FNCData
41 struct FNCData *next;
42 struct ExAllData buffer;
45 struct InstData
47 /* Normal stringgadget info */
48 STRPTR Contents;
49 STRPTR Original; /* Amiga-q (toggle) */
50 STRPTR Undo; /* Amiga-z (toggle) */
51 STRPTR Accept;
52 STRPTR Reject;
53 Object *ForwardObject;
54 Object *Popup; /* ctrl-p popup object */
55 UWORD DisplayPos;
56 UWORD BufferPos;
57 UWORD MaxLength;
58 WORD Alignment;
59 UWORD UndoPos;
60 UWORD Width;
62 /* Various system resources and data */
63 struct MUI_EventHandlerNode ehnode;
64 struct RastPort rport;
65 struct Locale *locale;
66 APTR Pool;
67 ULONG Flags;
68 Object *PopupMenu;
70 Object *KeyUpFocus, *KeyDownFocus;
72 /* Filename completion */
73 struct FNCData *FNCBuffer;
74 WORD FileNumber;
75 UWORD FileEntries;
76 UWORD FileNameStart;
78 /* For marking of text */
79 UWORD BlockStart;
80 WORD BlockStop;
82 /* For double/triple clicking */
83 ULONG StartSecs, StartMicros;
84 UBYTE ClickCount;
86 /* The hotkey which activates the stringgadget */
87 UBYTE CtrlChar;
89 /* Config */
90 STRPTR InactiveBackground;
91 ULONG InactiveText;
92 STRPTR ActiveBackground;
93 ULONG ActiveText;
94 ULONG CursorColor;
95 ULONG MarkedColor;
96 ULONG MarkedTextColor;
97 struct TextFont *Font;
100 #define FLG_Secret (1L << 0)
101 #define FLG_AdvanceOnCr (1L << 1)
102 #define FLG_BlockEnabled (1L << 2)
103 #define FLG_Active (1L << 3)
104 #define FLG_Ghosted (1L << 4)
105 #define FLG_Shown (1L << 5)
106 #define FLG_Original (1L << 6)
107 #define FLG_RedoAvailable (1L << 7)
108 #define FLG_StayActive (1L << 8)
109 #define FLG_SetFrame (1L << 9)
110 #define FLG_OwnFont (1L << 10)
111 #define FLG_OwnBackground (1L << 11)
112 #define FLG_NoInput (1L << 12)
113 #define FLG_DragOutside (1L << 13)
115 // our prototypes
116 VOID PrintString(struct IClass *, Object *);
117 ULONG HandleInput(struct IClass *, Object *, struct MUIP_HandleEvent *);
118 ULONG ConvertKey(struct IntuiMessage *);
119 VOID DeleteBlock(struct InstData *);
121 LONG MyTextLength(struct TextFont *, STRPTR, LONG);
122 LONG MyTextFit(struct TextFont *, STRPTR, LONG, LONG, LONG);
124 ULONG Get(struct IClass *, Object *, struct opGet *);
125 ULONG Set(struct IClass *, Object *, struct opSet *);
127 APTR MyAllocPooled(APTR, ULONG);
128 VOID MyFreePooled(APTR, APTR);
129 APTR ExpandPool(APTR, APTR, ULONG);
131 VOID strcpyback(STRPTR, STRPTR);
133 BOOL Overwrite(STRPTR, UWORD, UWORD, struct InstData *);
134 BOOL OverwriteA(STRPTR, UWORD, UWORD, UWORD, struct InstData *);
135 BOOL FileNameComplete(Object *, BOOL, struct InstData *);
136 LONG FileNameStart(struct MUIP_BetterString_FileNameStart *msg);
138 WORD CmpStrings(REG(a0, STRPTR), REG(a1, STRPTR));
140 VOID InitConfig(Object *, struct InstData *);
141 VOID FreeConfig(struct MUI_RenderInfo *, struct InstData *);
143 struct BitMap * SAVEDS ASM MUIG_AllocBitMap(REG(d0, LONG), REG(d1, LONG), REG(d2, LONG), REG(d3, LONG flags), REG(a0, struct BitMap *));
144 VOID SAVEDS ASM MUIG_FreeBitMap(REG(a0, struct BitMap *));
146 #endif /* BETTERSTRING_MCC_PRIV_H */