2024-05-12 18:28:53 +02:00
|
|
|
#include <stdio.h>
|
2024-05-12 21:14:23 +02:00
|
|
|
#include "servicepoint2.h"
|
2024-05-12 18:28:53 +02:00
|
|
|
|
|
|
|
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);
|
2024-05-15 20:34:51 +02:00
|
|
|
|
2024-05-16 23:12:03 +02:00
|
|
|
sp2_Command *command = sp2_command_bitmap_linear_win(0, 0, pixels, Uncompressed);
|
2024-05-15 20:34:51 +02:00
|
|
|
sp2_Packet *packet = sp2_packet_from_command(command);
|
|
|
|
if (!sp2_connection_send(connection, packet))
|
|
|
|
return 1;
|
2024-05-12 18:28:53 +02:00
|
|
|
|
|
|
|
sp2_connection_dealloc(connection);
|
|
|
|
return 0;
|
|
|
|
}
|