Merge from layout management branch.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2006-08-26 16:21:15 +00:00
parent 01595708f3
commit 9ecf9d1c1d
277 changed files with 45889 additions and 747 deletions
File diff suppressed because it is too large Load Diff
+93
View File
@@ -0,0 +1,93 @@
/* expat_config.h. Generated by configure. */
/* expat_config.h.in. Generated from configure.in by autoheader. */
/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
#define BYTEORDER 1234
/* Define to 1 if you have the `bcopy' function. */
#define HAVE_BCOPY 1
/* Define to 1 if you have the <check.h> header file. */
/* #undef HAVE_CHECK_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `getpagesize' function. */
/* #undef HAVE_GETPAGESIZE */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */
/* Define to 1 if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "[email protected]"
/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 1.95.8"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "expat"
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.95.8"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* whether byteorder is bigendian */
/* #undef WORDS_BIGENDIAN */
/* Define to specify how much context to retain around the current parse
point. */
#define XML_CONTEXT_BYTES 1024
/* Define to make parameter entity parsing functionality available. */
#define XML_DTD 1
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `long' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */
+92
View File
@@ -0,0 +1,92 @@
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* External API definitions */
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif
/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.
XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.
XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).
The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.
Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(XML_USE_MSC_EXTENSIONS)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.
If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
#define XMLCALL
#endif
#endif /* not defined XMLCALL */
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
#ifdef XML_USE_MSC_EXTENSIONS
#define XMLIMPORT __declspec(dllimport)
#endif
#endif
#endif /* not defined XML_STATIC */
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
+80
View File
@@ -0,0 +1,80 @@
/*
* Copyright 2006, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
*/
#ifndef ICON_UTILS_H
#define ICON_UTILS_H
#include <Mime.h>
class BBitmap;
class BNode;
// This class is a little different from many other classes.
// You don't create an instance of it; you just call its various
// static member functions for utility-like operations.
class BIconUtils {
BIconUtils();
~BIconUtils();
BIconUtils(const BIconUtils&);
BIconUtils& operator=(const BIconUtils&);
public:
// Utility function to import an icon from the node that
// has either of the provided attribute names. Which icon type
// is preferred (vector, small or large B_CMAP8 icon) depends
// on the colorspace of the provided bitmap. If the colorspace
// is B_CMAP8, B_CMAP8 icons are preferred. If no vector icon
// is available, the bitmap size must match the provided
// icon_size "size"!
static status_t GetIcon(BNode* node,
const char* vectorIconAttrName,
const char* smallIconAttrName,
const char* largeIconAttrName,
icon_size size,
BBitmap* result);
// Utility functions to import a vector icon in "flat icon"
// format from a BNode attribute or from a flat buffer in
// memory into the preallocated BBitmap "result".
// The colorspace of result needs to be B_RGBA32 or at
// least B_RGB32 (though that makes less sense). The icon
// will be scaled from it's "native" size of 64x64 to the
// size of the bitmap, the scale is derived from the bitmap
// width, the bitmap should have square dimension, or the
// icon will be cut off at the bottom (or have room left).
static status_t GetVectorIcon(BNode* node,
const char* attrName,
BBitmap* result);
static status_t GetVectorIcon(const uint8* buffer,
size_t size,
BBitmap* result);
// Utility function to import an "old" BeOS icon in B_CMAP8
// colorspace from either the small icon attribute or the
// large icon attribute as given in "smallIconAttrName" and
// "largeIconAttrName". Which icon is loaded depends on
// the given "size".
static status_t GetCMAP8Icon(BNode* node,
const char* smallIconAttrName,
const char* largeIconAttrName,
icon_size size,
BBitmap* icon);
// Utility functions to convert from old icon colorspace
// into colorspace of BBitmap "result" (should be B_RGBA32
// to make any sense).
static status_t ConvertFromCMAP8(BBitmap* source,
BBitmap* result);
static status_t ConvertFromCMAP8(const uint8* data,
uint32 width, uint32 height,
uint32 bytesPerRow,
BBitmap* result);
};
#endif // ICON_UTILS_H