Standard Macros

Standard Macros

Synopsis


#include <glib.h>

#define             G_OS_WIN32
#define             G_OS_BEOS
#define             G_OS_UNIX

#define             G_DIR_SEPARATOR
#define             G_DIR_SEPARATOR_S
#define             G_IS_DIR_SEPARATOR                  (c)
#define             G_SEARCHPATH_SEPARATOR
#define             G_SEARCHPATH_SEPARATOR_S

#define             TRUE
#define             FALSE

#define             NULL

#define             MIN                                 (a, b)
#define             MAX                                 (a, b)

#define             ABS                                 (a)
#define             CLAMP                               (x, low, high)

#define             G_STRUCT_MEMBER                     (member_type, struct_p, struct_offset)
#define             G_STRUCT_MEMBER_P                   (struct_p, struct_offset)
#define             G_STRUCT_OFFSET                     (struct_type, member)

#define             G_MEM_ALIGN

#define             G_CONST_RETURN

Description

Details

G_OS_WIN32

#define G_OS_WIN32


G_OS_BEOS

#define G_OS_BEOS


G_OS_UNIX

#define G_OS_UNIX


G_DIR_SEPARATOR

#define             G_DIR_SEPARATOR


G_DIR_SEPARATOR_S

#define             G_DIR_SEPARATOR_S


G_IS_DIR_SEPARATOR()

#define             G_IS_DIR_SEPARATOR(c)

c :


G_SEARCHPATH_SEPARATOR

#define             G_SEARCHPATH_SEPARATOR


G_SEARCHPATH_SEPARATOR_S

#define             G_SEARCHPATH_SEPARATOR_S


TRUE

#define	TRUE	(!FALSE)


FALSE

#define	FALSE	(0)


NULL

#define             NULL


MIN()

#define MIN(a, b)  (((a) < (b)) ? (a) : (b))

a :

b :


MAX()

#define MAX(a, b)  (((a) > (b)) ? (a) : (b))

a :

b :


ABS()

#define ABS(a)	   (((a) < 0) ? -(a) : (a))

a :


CLAMP()

#define CLAMP(x, low, high)  (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))

x :

low :

high :


G_STRUCT_MEMBER()

#define             G_STRUCT_MEMBER(member_type, struct_p, struct_offset)

member_type :

struct_p :

struct_offset :


G_STRUCT_MEMBER_P()

#define             G_STRUCT_MEMBER_P(struct_p, struct_offset)

struct_p :

struct_offset :


G_STRUCT_OFFSET()

#define             G_STRUCT_OFFSET(struct_type, member)

struct_type :

member :


G_MEM_ALIGN

#define             G_MEM_ALIGN

Indicates the number of bytes to which memory will be aligned on the current platform.


G_CONST_RETURN

#define             G_CONST_RETURN