Changeset 4384 for neercs


Ignore:
Timestamp:
Mar 10, 2010, 1:20:31 AM (10 years ago)
Author:
Sam Hocevar
Message:

Submitting empty code for later.

Location:
neercs/trunk/src
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/Makefile.am

    r4383 r4384  
    1212mini_neercs_SOURCES = mini-neercs.c mini-neercs.h mini-client.c \
    1313                      mini-server.c mini-socket.c mini-socket.h \
     14                      client/client.c client/client.h \
    1415                      client/screen.c client/screen.h
    1516mini_neercs_CFLAGS = @CACA_CFLAGS@ @PYTHON_CFLAGS@ -DMINI_NEERCS
  • neercs/trunk/src/client/client.c

    r4383 r4384  
    1616#endif
    1717
    18 #include <caca.h>
    19 
     18#include "client/screen.h"
     19#include "client/client.h"
    2020#include "mini-socket.h"
    2121
    22 struct nrx_screen
     22struct nrx_client
    2323{
    24     /* Public data */
    25     caca_canvas_t *cv;
    26 
    2724    /* Private data */
    2825    nrx_socket_t *sock;
  • neercs/trunk/src/client/client.h

    r4383 r4384  
    1212 */
    1313
    14 #ifndef __SCREEN_H__
    15 #define __SCREEN_H__
     14#ifndef __CLIENT_H__
     15#define __CLIENT_H__
    1616
    17 #include <caca.h>
     17typedef struct nrx_client nrx_client_t;
    1818
    19 typedef struct nrx_screen nrx_screen_t;
     19#endif /* __CLIENT_H__ */
    2020
    21 #endif /* __SCREEN_H__ */
    22 
  • neercs/trunk/src/client/screen.c

    r4383 r4384  
    1616#endif
    1717
     18#include <stdlib.h> /* malloc(), free() */
     19
    1820#include <caca.h>
    1921
     22#include "client/screen.h"
     23#include "client/client.h"
    2024#include "mini-socket.h"
     25
     26typedef enum nrx_type
     27{
     28    TYPE_TEST,
     29}
     30nrx_type_t;
     31
     32typedef enum nrx_state
     33{
     34    STATE_CREATED,
     35    STATE_CONNECTED,
     36}
     37nrx_state_t;
    2138
    2239struct nrx_screen
     
    2744    /* Private data */
    2845    nrx_socket_t *sock;
     46    nrx_state_t state;
     47    nrx_type_t type;
    2948};
    3049
     50nrx_screen_t *create_screen_test(nrx_client_t *client)
     51{
     52    nrx_screen_t *screen = malloc(sizeof(*screen));
     53
     54    screen->cv = caca_create_canvas(0, 0);
     55    screen->type = TYPE_TEST;
     56    screen->state = STATE_CREATED;
     57
     58    return screen;
     59}
     60
     61void tick_screen(nrx_screen_t *screen)
     62{
     63    /* TODO */;
     64}
     65
     66caca_canvas_t *get_screen_canvas(nrx_screen_t *screen)
     67{
     68    return screen->cv;
     69}
     70
     71void destroy_screen(nrx_screen_t *screen)
     72{
     73    /* TODO */;
     74}
     75
  • neercs/trunk/src/client/screen.h

    r4383 r4384  
    1515#define __SCREEN_H__
    1616
     17#include "client/client.h"
    1718#include <caca.h>
    1819
    1920typedef struct nrx_screen nrx_screen_t;
    2021
     22nrx_screen_t *create_screen_test(nrx_client_t *client);
     23void tick_screen(nrx_screen_t *screen);
     24caca_canvas_t *get_screen_canvas(nrx_screen_t *screen);
     25void destroy_screen(nrx_screen_t *screen);
     26
    2127#endif /* __SCREEN_H__ */
    2228
Note: See TracChangeset for help on using the changeset viewer.