pluie-echo/pluie_echo.h
2017-11-04 14:41:52 +01:00

226 lines
11 KiB
C

/* pluie_echo.h generated by valac 0.36.6, the Vala compiler, do not modify */
#ifndef __PLUIE_ECHO_H__
#define __PLUIE_ECHO_H__
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
G_BEGIN_DECLS
#define PLUIE_TYPE_ECHO (pluie_echo_get_type ())
#define PLUIE_TYPE_OUTPUT_FORMATTER (pluie_output_formatter_get_type ())
#define PLUIE_OUTPUT_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUIE_TYPE_OUTPUT_FORMATTER, PluieOutputFormatter))
#define PLUIE_OUTPUT_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUIE_TYPE_OUTPUT_FORMATTER, PluieOutputFormatterClass))
#define PLUIE_IS_OUTPUT_FORMATTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUIE_TYPE_OUTPUT_FORMATTER))
#define PLUIE_IS_OUTPUT_FORMATTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUIE_TYPE_OUTPUT_FORMATTER))
#define PLUIE_OUTPUT_FORMATTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUIE_TYPE_OUTPUT_FORMATTER, PluieOutputFormatterClass))
typedef struct _PluieOutputFormatter PluieOutputFormatter;
typedef struct _PluieOutputFormatterClass PluieOutputFormatterClass;
#define PLUIE_TYPE_COLOR_CONF (pluie_color_conf_get_type ())
#define PLUIE_COLOR_CONF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUIE_TYPE_COLOR_CONF, PluieColorConf))
#define PLUIE_COLOR_CONF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUIE_TYPE_COLOR_CONF, PluieColorConfClass))
#define PLUIE_IS_COLOR_CONF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUIE_TYPE_COLOR_CONF))
#define PLUIE_IS_COLOR_CONF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUIE_TYPE_COLOR_CONF))
#define PLUIE_COLOR_CONF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUIE_TYPE_COLOR_CONF, PluieColorConfClass))
typedef struct _PluieColorConf PluieColorConf;
typedef struct _PluieColorConfClass PluieColorConfClass;
typedef struct _PluieColorConfPrivate PluieColorConfPrivate;
#define PLUIE_TYPE_COLOR (pluie_color_get_type ())
#define PLUIE_COLOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUIE_TYPE_COLOR, PluieColor))
#define PLUIE_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUIE_TYPE_COLOR, PluieColorClass))
#define PLUIE_IS_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUIE_TYPE_COLOR))
#define PLUIE_IS_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUIE_TYPE_COLOR))
#define PLUIE_COLOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUIE_TYPE_COLOR, PluieColorClass))
typedef struct _PluieColor PluieColor;
typedef struct _PluieColorClass PluieColorClass;
typedef struct _PluieColorPrivate PluieColorPrivate;
typedef struct _PluieOutputFormatterPrivate PluieOutputFormatterPrivate;
#define PLUIE_SYS_TYPE_CMD (pluie_sys_cmd_get_type ())
#define PLUIE_SYS_CMD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLUIE_SYS_TYPE_CMD, PluieSysCmd))
#define PLUIE_SYS_CMD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLUIE_SYS_TYPE_CMD, PluieSysCmdClass))
#define PLUIE_SYS_IS_CMD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLUIE_SYS_TYPE_CMD))
#define PLUIE_SYS_IS_CMD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLUIE_SYS_TYPE_CMD))
#define PLUIE_SYS_CMD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLUIE_SYS_TYPE_CMD, PluieSysCmdClass))
typedef struct _PluieSysCmd PluieSysCmd;
typedef struct _PluieSysCmdClass PluieSysCmdClass;
typedef struct _PluieSysCmdPrivate PluieSysCmdPrivate;
typedef enum {
PLUIE_ECHO_DEFAULT,
PLUIE_ECHO_COMMENT,
PLUIE_ECHO_OPTION,
PLUIE_ECHO_OPTION_SEP,
PLUIE_ECHO_ARG,
PLUIE_ECHO_ARG_SEP,
PLUIE_ECHO_TITLE,
PLUIE_ECHO_TITLE_ITEM,
PLUIE_ECHO_TITLE_SEP,
PLUIE_ECHO_SECTION,
PLUIE_ECHO_SEP,
PLUIE_ECHO_ITEM,
PLUIE_ECHO_ACTION,
PLUIE_ECHO_DONE,
PLUIE_ECHO_FAIL,
PLUIE_ECHO_KEY,
PLUIE_ECHO_VAL,
PLUIE_ECHO_DATE,
PLUIE_ECHO_TIME,
PLUIE_ECHO_MICROTIME,
PLUIE_ECHO_FILE,
PLUIE_ECHO_NUM,
PLUIE_ECHO_ENTER,
PLUIE_ECHO_LEAVE,
PLUIE_ECHO_WARN,
PLUIE_ECHO_ERROR
} PluieECHO;
struct _PluieColorConf {
GTypeInstance parent_instance;
volatile int ref_count;
PluieColorConfPrivate * priv;
};
struct _PluieColorConfClass {
GTypeClass parent_class;
void (*finalize) (PluieColorConf *self);
};
struct _PluieColor {
GTypeInstance parent_instance;
volatile int ref_count;
PluieColorPrivate * priv;
};
struct _PluieColorClass {
GTypeClass parent_class;
void (*finalize) (PluieColor *self);
};
struct _PluieOutputFormatter {
GTypeInstance parent_instance;
volatile int ref_count;
PluieOutputFormatterPrivate * priv;
gint indent;
gint term_width;
PluieColorConf* conf;
};
struct _PluieOutputFormatterClass {
GTypeClass parent_class;
void (*finalize) (PluieOutputFormatter *self);
};
struct _PluieSysCmd {
GTypeInstance parent_instance;
volatile int ref_count;
PluieSysCmdPrivate * priv;
};
struct _PluieSysCmdClass {
GTypeClass parent_class;
void (*finalize) (PluieSysCmd *self);
};
GType pluie_echo_get_type (void) G_GNUC_CONST;
gpointer pluie_output_formatter_ref (gpointer instance);
void pluie_output_formatter_unref (gpointer instance);
GParamSpec* pluie_param_spec_output_formatter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void pluie_value_set_output_formatter (GValue* value, gpointer v_object);
void pluie_value_take_output_formatter (GValue* value, gpointer v_object);
gpointer pluie_value_get_output_formatter (const GValue* value);
GType pluie_output_formatter_get_type (void) G_GNUC_CONST;
void pluie_echo_init (gboolean debug, const gchar* path, PluieOutputFormatter* * of);
extern gboolean pluie_dbg_DBG_ENABLED;
#define PLUIE_DBG_DBG_ENTER ((gint8) 1)
#define PLUIE_DBG_DBG_LEAVE ((gint8) 2)
#define PLUIE_DBG_DBG_INLINE ((gint8) 0)
#define PLUIE_DBG_DBG_ERROR ((gint8) 8)
#define PLUIE_DBG_DBG_WARN ((gint8) 9)
void pluie_dbg_init (PluieOutputFormatter* of, gboolean debug);
void pluie_dbg_in (const gchar* method, const gchar* params, gint line, const gchar* file);
void pluie_dbg_out (const gchar* method, const gchar* params, gint line, const gchar* file);
void pluie_dbg_msg (const gchar* msg, gint line, const gchar* file);
void pluie_dbg_error (const gchar* msg, const gchar* method, gint line, const gchar* file, gint8 mode);
void pluie_dbg_log (const gchar* msg, gint line, gint8 mode, const gchar* file);
gpointer pluie_color_conf_ref (gpointer instance);
void pluie_color_conf_unref (gpointer instance);
GParamSpec* pluie_param_spec_color_conf (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void pluie_value_set_color_conf (GValue* value, gpointer v_object);
void pluie_value_take_color_conf (GValue* value, gpointer v_object);
gpointer pluie_value_get_color_conf (const GValue* value);
GType pluie_color_conf_get_type (void) G_GNUC_CONST;
PluieColorConf* pluie_color_conf_new (const gchar* path);
PluieColorConf* pluie_color_conf_construct (GType object_type, const gchar* path);
gpointer pluie_color_ref (gpointer instance);
void pluie_color_unref (gpointer instance);
GParamSpec* pluie_param_spec_color (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void pluie_value_set_color (GValue* value, gpointer v_object);
void pluie_value_take_color (GValue* value, gpointer v_object);
gpointer pluie_value_get_color (const GValue* value);
GType pluie_color_get_type (void) G_GNUC_CONST;
PluieColor* pluie_color_conf_get (PluieColorConf* self, PluieECHO name);
gint pluie_color_conf_param (PluieColorConf* self, const gchar* name);
PluieColor* pluie_color_new (guint8* fg, gboolean bold, guint8* bg);
PluieColor* pluie_color_construct (GType object_type, guint8* fg, gboolean bold, guint8* bg);
gchar* pluie_color_to_string (PluieColor* self);
gchar* pluie_color_s (PluieColor* self, const gchar* label, gboolean off, gboolean* bold);
gchar* pluie_color_off (void);
guint8* pluie_color_get_fg (PluieColor* self);
void pluie_color_set_fg (PluieColor* self, guint8* value);
guint8* pluie_color_get_bg (PluieColor* self);
void pluie_color_set_bg (PluieColor* self, guint8* value);
gboolean pluie_color_get_bold (PluieColor* self);
void pluie_color_set_bold (PluieColor* self, gboolean value);
PluieOutputFormatter* pluie_output_formatter_new (PluieColorConf* conf);
PluieOutputFormatter* pluie_output_formatter_construct (GType object_type, PluieColorConf* conf);
PluieColor* pluie_output_formatter_c (PluieOutputFormatter* self, PluieECHO name);
gchar* pluie_output_formatter_move_up (PluieOutputFormatter* self, gint line);
gchar* pluie_output_formatter_move_down (PluieOutputFormatter* self, gint line);
PluieColor* pluie_output_formatter_test (PluieOutputFormatter* self, gboolean exp, gboolean _error_);
gchar* pluie_output_formatter_s_indent (PluieOutputFormatter* self, gint8 adjust);
gchar* pluie_output_formatter_title_sep (PluieOutputFormatter* self);
void pluie_output_formatter_title (PluieOutputFormatter* self, const gchar* label, const gchar* version, const gchar* author);
void pluie_output_formatter_action (PluieOutputFormatter* self, const gchar* name, const gchar* val);
void pluie_output_formatter_warn (PluieOutputFormatter* self, const gchar* label);
void pluie_output_formatter_error (PluieOutputFormatter* self, const gchar* label, gboolean warn);
void pluie_output_formatter_rs (PluieOutputFormatter* self, gboolean test, const gchar* done, const gchar* fail);
void pluie_output_formatter_echo_up (PluieOutputFormatter* self, gint line, const gchar* s);
void pluie_output_formatter_echo (PluieOutputFormatter* self, const gchar* data, gboolean lf, gboolean indent_all, PluieECHO color, gint8 indent_adjust);
void pluie_output_formatter_state (PluieOutputFormatter* self, gboolean test);
gchar* pluie_output_formatter_wordwrap (PluieOutputFormatter* self, const gchar* str, gint width, gboolean cut);
void pluie_output_formatter_usage_option (PluieOutputFormatter* self, const gchar* name, const gchar* shortname, const gchar* argname, gboolean val, gint echo_up);
void pluie_output_formatter_keyval (PluieOutputFormatter* self, const gchar* key, const gchar* val);
gpointer pluie_sys_cmd_ref (gpointer instance);
void pluie_sys_cmd_unref (gpointer instance);
GParamSpec* pluie_sys_param_spec_cmd (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void pluie_sys_value_set_cmd (GValue* value, gpointer v_object);
void pluie_sys_value_take_cmd (GValue* value, gpointer v_object);
gpointer pluie_sys_value_get_cmd (const GValue* value);
GType pluie_sys_cmd_get_type (void) G_GNUC_CONST;
PluieSysCmd* pluie_sys_cmd_new (const gchar* name);
PluieSysCmd* pluie_sys_cmd_construct (GType object_type, const gchar* name);
gint pluie_sys_cmd_run (PluieSysCmd* self, gboolean display, const gchar* name);
const gchar* pluie_sys_cmd_get_output (PluieSysCmd* self);
const gchar* pluie_sys_cmd_get_error (PluieSysCmd* self);
const gchar* pluie_sys_cmd_get_name (PluieSysCmd* self);
gint pluie_sys_cmd_get_status (PluieSysCmd* self);
G_END_DECLS
#endif