rename to servicepoint, new dir structure, WIP build.rs
This commit is contained in:
parent
e9dc4b59d2
commit
f2d98af532
61 changed files with 751 additions and 140 deletions
0
examples/lang_c/src/lib.rs
Normal file
0
examples/lang_c/src/lib.rs
Normal file
19
examples/lang_c/src/main.c
Normal file
19
examples/lang_c/src/main.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <stdio.h>
|
||||
#include "servicepoint.h"
|
||||
|
||||
int main(void) {
|
||||
sp2_Connection *connection = sp2_connection_open("localhost:2342");
|
||||
if (connection == NULL)
|
||||
return 1;
|
||||
|
||||
sp2_PixelGrid *pixels = sp2_pixel_grid_new(sp2_PIXEL_WIDTH, sp2_PIXEL_HEIGHT);
|
||||
sp2_pixel_grid_fill(pixels, true);
|
||||
|
||||
sp2_Command *command = sp2_command_bitmap_linear_win(0, 0, pixels, Uncompressed);
|
||||
sp2_Packet *packet = sp2_packet_from_command(command);
|
||||
if (!sp2_connection_send(connection, packet))
|
||||
return 1;
|
||||
|
||||
sp2_connection_dealloc(connection);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue