⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eb_defs.h

📁 这是法国Kaleido公司提供了一个手机mmi设计平台
💻 H
字号:
/***************************************************************************
EB_Defs.h  - Esteban's definitions  
-------------------
begin                : Tue Mar 3 2004
copyright            : (C) 2004 by DigitalAirways
email                : info@digitalairways.com
***************************************************************************/

/*
* Copyright (c) 2000-2004 DigitalAirways, sarl. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information").  You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
*/

/*
**************************************************************
* TODO
**************************************************************

- 



**************************************************************
* HISTORY
**************************************************************

- 


**************************************************************
* MORE ABOUT MEMORY CHECKING
**************************************************************

- This file is implementing some features aiming to trace memory
allocation integrity.
To use these features, the compile flag DEV_MEMCHECK must be defined.
In this case:
- On Win32 platforms (ie. when _WIN32 is defined): the debug allocator
offered by MSVC is used. It's good to check that _DEBUG is also defined.

...PLEASE READ THE REGARDING DOCUMENTATION...
...TO LEARN MORE ABOUT THESE FEATURES...

*/

#ifndef __EB_DEFS__
#define __EB_DEFS__


#include "EB_PFDefs.h"

#ifdef  __cplusplus
extern "C" {
#endif

#ifndef _STDLIB_H_INCLUDED_
	// WARNING: thise functions may be used by the core runtime but SHOULD not be used in portable plugins.
	// usually prototyped in stdlib.h :
	long strtol (const char *, char **, int);
	int atoi (const char *); 
	int toupper(int); // ANSI says that toupper must be defined in <ctype.h>
#endif /* ndef _STDLIB_H_INCLUDED_ */

#ifndef _STRING_H_INCLUDED_
	// usually prototyped in string.h:
	char* strcpy(char *, const char *);
	char* strcat(char *, const char *);
	char* strncpy(char *, const char *, unsigned int);
	unsigned int strlen(const char *);
	int strcmp(const char *, const char *);
	int strncmp(const char *, const char *, unsigned int);
	char* strstr(const char *, const char *);
	char* strchr(const char *, int);
	void* memcpy(void* dst, const void* src, unsigned int);
	void* memset(void* dst, int c, unsigned int n);
#endif /* ndef _STRING_H_INCLUDED_ */


#ifndef _STDARG_H_INCLUDED_
	// usually prototyped in stdarg.h:
#include <stdarg.h>
#endif /* ndef _STDARG_H_INCLUDED_ */



#ifdef  __cplusplus
}
#endif

//
// To compute the product name
#ifndef PRODUCT_NAME
#define PRODUCT_NAME "Esteban"
#endif /* ndef PRODUCT_NAME */
#ifndef PRODUCT_VERS
#define PRODUCT_VERS "00.01.00"
#endif /* ndef PRODUCT_VERS */
#ifndef PRODUCT_TYPE
#define PRODUCT_TYPE "DAW Reference Design"
#endif /* ndef PRODUCT_TYPE */

// Layout browsing history
#ifndef MAX_HISTORY
#define MAX_HISTORY 100
#endif /* ndef MAX_HISTORY */
// Font cache size
#ifndef FONT_CACHE_LEN
#define FONT_CACHE_LEN 10
#endif /* ndef FONT_CACHE_LEN */
// Max number of images in the pool
#ifndef POOLED_IMAGES
#define POOLED_IMAGES 20
#endif /* ndef POOLED_IMAGES */
// Default size of the temporary buffer
#ifndef MAX_TMPBUFFER_LEN
#define MAX_TMPBUFFER_LEN 1000
#endif /* ndef MAX_TMPBUFFER_LEN */
/* Default resources' directory */
#ifndef RESOURCES_DIRECTORY
//#define RESOURCES_DIRECTORY ""
#endif /* ndef RESOURCES_DIRECTORY */
// Library functions specifiers
#ifndef KREBDLIBS_API
#define KREBDLIBS_API
#endif /* ndef KREBDLIBS_API */
// Dev functions specifiers
#ifndef KREBDEV_API
#define KREBDEV_API
#endif /* ndef KREBDEV_API */
/* Static size of inputOption's buffer */
#ifndef MAX_INPUTOPTION_LEN
#define MAX_INPUTOPTION_LEN 100
#endif /* ndef MAX_INPUTOPTION_LEN */


#ifndef _TRUE_FALSE_DEFINED_
#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif
#endif /* ndef _TRUE_FALSE_DEFINED_ */

#ifndef NULL
#define NULL 0
#endif

#ifndef KALEIDO_TIME_TYPE
#define KALEIDO_TIME_TYPE unsigned long
#define KALEIDO_MAX_TIME_VALUE 0xFFFFFFFF
#endif // ndef KALEIDO_TIME_TYPE


// Safe memory management
#ifndef SAFE_FREE
#define SAFE_FREE(x) { if(x) {xfree(x); x=0;} }
#endif /* ndef SAFE_FREE */

#ifndef XNEW
#define XNEW(x) new x
#endif /* ndef XNEW */

#ifndef XNEWTAB
#define XNEWTAB(x) new x
#endif /* ndef XNEWTAB */

#ifndef XDELETE
#define XDELETE(x) delete(x)
#endif /* ndef XNEW */

#ifndef XDELETAB
#define XDELETAB(x) delete[](x)
#endif /* ndef XNEWTAB */

#ifndef SAFE_DELETE
#define SAFE_DELETE(x) { if(x) {XDELETE(x); x=0;} }
#endif /* ndef SAFE_DELETE */

#ifndef SAFE_DELETAB
#define SAFE_DELETAB(x) { if(x) {XDELETAB(x); x=0;} }
#endif /* ndef SAFE_DELETAB */

#ifndef DESTRUCTOR_SINGLE
#define DESTRUCTOR_SINGLE(X) static void operator delete(void* p) { xfree(p); }
#endif /* ndef DESTRUCTOR_SINGLE */
#ifndef DESTRUCTOR_ARRAY
#define DESTRUCTOR_ARRAY(X)  static void operator delete[](void* p) { xfree(p); }
#endif /* ndef DESTRUCTOR_ARRAY */
#ifndef DEFINE_DELETE
#define DEFINE_DELETE(X) DESTRUCTOR_SINGLE(X) DESTRUCTOR_ARRAY(X) 
#endif /* ndef DEFINE_DELETE */
#ifndef NEW_SINGLE
#define NEW_SINGLE(X) static void* operator new(size_t s) { return xmalloc(s); }
#endif /* ndef NEW_SINGLE */
#ifndef NEW_ARRAY
#define NEW_ARRAY(X)  static void* operator new[](size_t s) { return xmalloc(s); }
#endif /* ndef NEW_ARRAY */
#ifndef DEFINE_NEW
#define DEFINE_NEW(X) NEW_SINGLE(X) NEW_ARRAY(X) 
#endif /* ndef DEFINE_NEW */

// The macro BREAKPOINT allows to include a beakpoint directly in the code.
// This may be very useful to debug dynamic libraries that do not offer
// direct references usable by the debugger/IDE. The actual implementation
// may be done in EB_PFDefs.h
#ifndef BREAKPOINT
#define BREAKPOINT	/**< Invoke debugger */
#endif /* ndef BREAKPOINT */


// Memory information
#ifdef DEV_DEBUG
#ifndef SHOW_MEMORY
#define SHOW_MEMORY(X) { X; }
#endif /* ndef SHOW_MEMORY */
#endif /* def DEV_DEBUG */

#ifdef DEV_PROFILE
#ifndef STACK_WARNING
#define STACK_WARNING	5000
#endif /* ndef STACK_WARNING */
#ifndef STACK_PANIC
#define STACK_PANIC		10000
#endif /* ndef STACK_PANIC */
/*
* This macro allows to get the stack pointer's value
* The right place to define its actual implementation is in PFDefs.h
*/
#ifndef GET_STACK_POINTER
#define GET_STACK_POINTER(X) X=0;
#endif /* ndef GET_STACK_POINTER */
#endif /* def DEV_PROFILE */


// Statics
#define  Statics__SEPARATORS            " \r\n\t"
#define  Statics__UPPER_CASE_LETTER     "AZERTYUIOPMLKJHGFDSQWXCVBN"
#define  Statics__LOWER_CASE_LETTER     "azertyuiopqsdfghjklmwxcvbn"
#define  Statics__CURRENCY_SYMBOL       ""
#define  Statics__CONNECTOR_PONCTUATION "_"
#define  Statics__DASH_PONCTUATION      "-"
#define  Statics__ENCLOSING_MARK        "\'\""
#define  Statics__END_PONCTUATION       "!?."
#define  Statics__LINE_SEPARATOR        "\n"
#define  Statics__OTHER_PONCTUATION     "),;:"
#define  Statics__PARAGRAPH_SEPARATOR   "

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -