WebCFace 2.5.2
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
def_types.h
Go to the documentation of this file.
1#pragma once
2#ifdef WEBCFACE_MESON
3#include "webcface-config.h"
4#else
5#include "webcface/common/webcface-config.h"
6#endif
7#include <wchar.h>
8#include <float.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef void wcfClient;
15typedef void wcfPromise;
17
18typedef enum wcfStatus {
19 WCF_OK = 0,
29
30typedef enum wcfValType {
37
50typedef struct wcfMultiVal {
55 double as_double;
65 const char *as_str;
70 int as_int;
84typedef struct wcfMultiValW {
89 double as_double;
99 const wchar_t *as_str;
106
111typedef struct wcfFuncCallHandle {
131typedef struct wcfFuncCallHandleW {
147
153 void *user_data);
159 void *user_data);
164typedef void(WEBCFACE_CALL *wcfEventCallback1)(const char *member,
165 void *user_data);
171typedef void(WEBCFACE_CALL *wcfEventCallback1W)(const wchar_t *member,
172 void *user_data);
177typedef void(WEBCFACE_CALL *wcfEventCallback2)(const char *member,
178 const char *field,
179 void *user_data);
185typedef void(WEBCFACE_CALL *wcfEventCallback2W)(const wchar_t *member,
186 const wchar_t *field,
187 void *user_data);
188
194
195typedef enum wcfColor {
211
218typedef struct wcfViewComponent {
233 const char *text;
263 double min;
268 double max;
273 double step;
274
275#if WEBCFACE_PTR_SIZE == 4
276 // currently 4 * 16
277 int reserved[8];
278#elif WEBCFACE_PTR_SIZE == 8
279 // currently 4 * 22
280 int reserved[14];
281#endif
283
289typedef struct wcfViewComponentW {
292 const wchar_t *text;
298 double min;
299 double max;
300 double step;
301#if WEBCFACE_PTR_SIZE == 4
302 int reserved[8];
303#elif WEBCFACE_PTR_SIZE == 8
304 int reserved[14];
305#endif
307
308#ifdef __cplusplus
309}
310#endif
wcfViewComponentType
Definition def_types.h:189
@ WCF_VIEW_BUTTON
Definition def_types.h:192
@ WCF_VIEW_TEXT
Definition def_types.h:190
@ WCF_VIEW_NEW_LINE
Definition def_types.h:191
void wcfClient
Definition def_types.h:14
wcfStatus
Definition def_types.h:18
@ WCF_OK
Definition def_types.h:19
@ WCF_BAD_HANDLE
Definition def_types.h:21
@ WCF_INVALID_ARGUMENT
Definition def_types.h:22
@ WCF_BAD_WCLI
Definition def_types.h:20
@ WCF_EXCEPTION
Definition def_types.h:24
@ WCF_NO_DATA
Definition def_types.h:27
@ WCF_NOT_RETURNED
Definition def_types.h:26
@ WCF_NOT_CALLED
Definition def_types.h:25
@ WCF_NOT_FOUND
Definition def_types.h:23
void(* wcfEventCallback1W)(const wchar_t *member, void *user_data)
イベントに登録する、引数1つ(+voidポインタ)を取るコールバックの型 (wstring)
Definition def_types.h:171
void(* wcfEventCallback2)(const char *member, const char *field, void *user_data)
イベントに登録する、引数2つ(+voidポインタ)を取るコールバックの型
Definition def_types.h:177
void(* wcfFuncCallbackW)(wcfFuncCallHandleW *call_handle, void *user_data)
funcにsetするコールバックの型 (wstring)
Definition def_types.h:158
void(* wcfEventCallback2W)(const wchar_t *member, const wchar_t *field, void *user_data)
イベントに登録する、引数2つ(+voidポインタ)を取るコールバックの型 (wstring)
Definition def_types.h:185
wcfValType
Definition def_types.h:30
@ WCF_VAL_NONE
Definition def_types.h:31
@ WCF_VAL_STRING
Definition def_types.h:32
@ WCF_VAL_DOUBLE
Definition def_types.h:35
@ WCF_VAL_INT
Definition def_types.h:34
@ WCF_VAL_BOOL
Definition def_types.h:33
void(* wcfFuncCallback)(wcfFuncCallHandle *call_handle, void *user_data)
funcにsetするコールバックの型
Definition def_types.h:152
void(* wcfEventCallback1)(const char *member, void *user_data)
イベントに登録する、引数1つ(+voidポインタ)を取るコールバックの型
Definition def_types.h:164
void wcfPromise
Definition def_types.h:15
wcfColor
Definition def_types.h:195
@ WCF_COLOR_WHITE
Definition def_types.h:198
@ WCF_COLOR_CYAN
Definition def_types.h:205
@ WCF_COLOR_RED
Definition def_types.h:200
@ WCF_COLOR_PINK
Definition def_types.h:209
@ WCF_COLOR_INHERIT
Definition def_types.h:196
@ WCF_COLOR_TEAL
Definition def_types.h:204
@ WCF_COLOR_GREEN
Definition def_types.h:203
@ WCF_COLOR_PURPLE
Definition def_types.h:208
@ WCF_COLOR_INDIGO
Definition def_types.h:207
@ WCF_COLOR_YELLOW
Definition def_types.h:202
@ WCF_COLOR_BLACK
Definition def_types.h:197
@ WCF_COLOR_GRAY
Definition def_types.h:199
@ WCF_COLOR_BLUE
Definition def_types.h:206
@ WCF_COLOR_ORANGE
Definition def_types.h:201
wcfPromise wcfAsyncFuncResult
Definition def_types.h:16
受信した関数呼び出しの情報を保持するstruct (wstring)
Definition def_types.h:131
int arg_size
引数の個数
Definition def_types.h:145
const wcfMultiValW * args
呼び出された引数
Definition def_types.h:138
受信した関数呼び出しの情報を保持するstruct
Definition def_types.h:111
int arg_size
引数の個数
Definition def_types.h:125
const wcfMultiVal * args
呼び出された引数
Definition def_types.h:118
数値と文字列をまとめて扱うためのstruct (wstring)
Definition def_types.h:84
double as_double
double型でのアクセス
Definition def_types.h:89
int as_int
int型でのアクセス
Definition def_types.h:104
const wchar_t * as_str
wchar_t*型でのアクセス
Definition def_types.h:99
数値と文字列をまとめて扱うためのstruct
Definition def_types.h:50
const char * as_str
char*型でのアクセス
Definition def_types.h:65
double as_double
double型でのアクセス
Definition def_types.h:55
int as_int
int型でのアクセス
Definition def_types.h:70
Viewの要素を表すstruct (wstring)
Definition def_types.h:289
double max
Definition def_types.h:299
const wchar_t * on_click_field
Definition def_types.h:293
const wchar_t * text
Definition def_types.h:292
double step
Definition def_types.h:300
wcfViewComponentType type
Definition def_types.h:290
wcfColor text_color
Definition def_types.h:296
int reserved[14]
Definition def_types.h:304
const wcfMultiValW * option
Definition def_types.h:295
const wchar_t * on_click_member
Definition def_types.h:293
double min
Definition def_types.h:298
wcfColor bg_color
Definition def_types.h:297
const wchar_t * text_ref_field
Definition def_types.h:294
int option_num
Definition def_types.h:291
const wchar_t * text_ref_member
Definition def_types.h:294
Viewの要素を表すstruct.
Definition def_types.h:218
double max
inputの最大値 (未設定 = DBL_MAX)
Definition def_types.h:268
const char * text
表示する文字列 (空の場合nullptr)
Definition def_types.h:233
const char * text_ref_field
Definition def_types.h:243
double step
inputの刻み幅 (未設定 = 0)
Definition def_types.h:273
wcfViewComponentType type
Componentの種類
Definition def_types.h:223
wcfColor text_color
テキストの色
Definition def_types.h:253
int reserved[14]
Definition def_types.h:280
const char * on_click_member
クリック時に実行するFuncのmemberとfield、またはnullptr
Definition def_types.h:238
const wcfMultiVal * option
inputの選択肢
Definition def_types.h:248
double min
inputの最小値 (未設定 = -DBL_MAX)
Definition def_types.h:263
wcfColor bg_color
背景の色
Definition def_types.h:258
int option_num
inputの選択肢の数 (optionの指す配列の要素数)
Definition def_types.h:228
const char * on_click_field
Definition def_types.h:238
const char * text_ref_member
inputが参照するTextのmemberとfield、またはnullptr
Definition def_types.h:243
#define WEBCFACE_CALL
Definition webcface-config.h:97