1 /***************************************************************************
3 BetterString.mcc - A better String gadget MUI Custom Class
4 Copyright (C) 1997-2000 Allan Odgaard
5 Copyright (C) 2005-2013 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/
21 ***************************************************************************/
23 #ifndef BETTERSTRING_MCP_PRIV_H
24 #define BETTERSTRING_MCP_PRIV_H
26 #include "BetterString_mcp.h"
29 #include <mcc_common.h>
31 #define MCPMAXRAWBUF 64
33 #define IEQUALIFIER_SHIFT 0x0200
34 #define IEQUALIFIER_ALT 0x0400
35 #define IEQUALIFIER_COMMAND 0x0800
55 Object
*Objects
[NumberOfObject
];
58 Object
*CreatePrefsGroup(struct InstData_MCP
*data
);
60 #define LIBVER(lib) ((struct Library *)lib)->lib_Version
61 #define LIBREV(lib) ((struct Library *)lib)->lib_Revision
62 #define VERSION_IS_AT_LEAST(ver, rev, minver, minrev) (((ver) > (minver)) || ((ver) == (minver) && (rev) == (minrev)) || ((ver) == (minver) && (rev) > (minrev)))
63 #define LIB_VERSION_IS_AT_LEAST(lib, minver, minrev) VERSION_IS_AT_LEAST(((struct Library *)(lib))->lib_Version, ((struct Library *)(lib))->lib_Revision, minver, minrev)
66 // Gets an attribute value from a MUI object
67 IPTR
xget(Object
*obj
, const IPTR attr
);
69 // please note that we do not evaluate the return value of GetAttr()
70 // as some attributes (e.g. MUIA_Selected) always return FALSE, even
71 // when they are supported by the object. But setting b=0 right before
72 // the GetAttr() should catch the case when attr doesn't exist at all
73 #define xget(OBJ, ATTR) ({IPTR b=0; GetAttr(ATTR, OBJ, &b); b;})
77 #endif /* BETTERSTRING_MCP_PRIV_H */