qmlFrontend/flib.h
author unc0rr
Mon, 22 Sep 2014 02:10:39 +0400
branchqmlfrontend
changeset 10420 02c573d19224
parent 10418 091d2c0216c3
child 10424 4be6cd55f1cf
permissions -rw-r--r--
flib: - Ability to pass raw data via IPC qmlfrontend: - Pass message received by callback through event loop to handle it in main thread - Get preview image from engine on button click and render it in Image object
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     1
#ifndef FLIB_H
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     2
#define FLIB_H
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     3
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     4
#include <stdint.h>
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     5
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     6
#ifdef __cplusplus
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     7
extern "C" {
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     8
#endif
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     9
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    10
typedef union string255_
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    11
    {
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    12
        struct {
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    13
            unsigned char s[256];
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    14
        };
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    15
        struct {
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    16
            unsigned char len;
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    17
            unsigned char str[255];
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    18
        };
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    19
    } string255;
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    20
10418
091d2c0216c3 Move away from passing shortstrings into C code, now IPC works
unc0rr
parents: 10416
diff changeset
    21
typedef void RunEngine_t(int argc, const char ** argv);
10420
unc0rr
parents: 10418
diff changeset
    22
typedef void registerIPCCallback_t(void * context, void (*)(void * context, const char * msg, uint32_t len));
unc0rr
parents: 10418
diff changeset
    23
typedef void ipcToEngine_t(const char * msg, uint8_t len);
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    24
typedef void flibInit_t();
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    25
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    26
#ifdef __cplusplus
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    27
}
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    28
#endif
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    29
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    30
#endif // FLIB_H