gtypes.zc

来自「实现树形结构」· ZC 代码 · 共 56 行

ZC
56
字号

import "c-types"

public

equ FALSE = 0
equ TRUE = 1

// from glibconfig:
typedef gssize = c long
typedef gsize = c unsigned long


typedef gchar = char
typedef gshort = short
typedef glong = c long
typedef gint = c int
typedef gboolean = gint

typedef guchar = byte
typedef gushort = word
typedef gulong = c unsigned long
typedef guint = c unsigned int

//typedef float   gfloat;
//typedef double  gdouble;

typedef gpointer = -> void
typedef gconstpointer = -> void

typedef GCompareFunc = {gconstpointer, gconstpointer} gint
typedef GCompareDataFunc = {gconstpointer, gconstpointer, gconstpointer} gint
typedef GEqualFunc = {gconstpointer, gconstpointer} gboolean

typedef GDestroyNotify = {gpointer} void
typedef GFunc = {gpointer, gpointer} void
typedef GHashFunc = {gconstpointer} guint
typedef GHFunc = {gpointer, gpointer, gpointer} void
typedef GFreeFunc = {gpointer} void


struct GTimeVal
	tv_sec : glong 
	tv_usec : glong
end


typedef gint8 = octet
typedef gint16 = short
typedef gint32 = int
typedef guint8 = byte
typedef guint16 = word
typedef guint32 = dword

end

⌨️ 快捷键说明

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