Ignore:
Timestamp:
Jun 28, 2008, 1:22:26 PM (13 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Removed general local variables from main() and put it in struct screen_list
  • Moved most of the input handling to input.c
  • Moved lock feature to lock.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/neercs.h

    r2488 r2495  
    8080    /* Lock */
    8181    int locked;
     82    int lock_offset;
    8283    char lockpass[1024];
    8384    char lockmsg[1024];
     
    99100
    100101    struct option *config;
    101 
     102    char *default_shell;
     103    struct recurrent_list *recurrent_list;
     104
     105    cucul_canvas_t *cv;
     106    caca_display_t *dp;
    102107};
    103108
     
    123128
    124129
     130struct screen_list *create_screen_list(void);
    125131
    126132int create_pty(char *cmd, unsigned int w, unsigned int h, int *cpid);
     
    131137int set_tty_size(int fd, unsigned int w, unsigned int h);
    132138int update_terms(struct screen_list* screen_list);
    133 void refresh_screens(cucul_canvas_t *cv, struct screen_list *screen_list);
     139void refresh_screens(struct screen_list *screen_list);
    134140int update_screens_contents(struct screen_list* screen_list);
    135141long long get_us(void);
     
    150156
    151157/* Window managers */
    152 void update_windows_props(cucul_canvas_t *cv, struct screen_list *screen_list);
    153 void update_windows_props_cards(cucul_canvas_t *cv, struct screen_list *screen_list);
    154 void update_windows_props_hsplit(cucul_canvas_t *cv, struct screen_list *screen_list);
    155 void update_windows_props_full(cucul_canvas_t *cv, struct screen_list *screen_list);
    156 void update_windows_props_vsplit(cucul_canvas_t *cv, struct screen_list *screen_list);
     158void update_windows_props(struct screen_list *screen_list);
     159void update_windows_props_cards(struct screen_list *screen_list);
     160void update_windows_props_hsplit(struct screen_list *screen_list);
     161void update_windows_props_full(struct screen_list *screen_list);
     162void update_windows_props_vsplit(struct screen_list *screen_list);
    157163
    158164/* Effects and addons */
    159 void draw_thumbnails(cucul_canvas_t *cv, struct screen_list *screen_list);
    160 void draw_status(cucul_canvas_t *cv, struct screen_list *screen_list);
    161 void draw_help(cucul_canvas_t *cv, struct screen_list *screen_list);
    162 void draw_lock(cucul_canvas_t *cv, struct screen_list *screen_list);
     165void draw_thumbnails(struct screen_list *screen_list);
     166void draw_status(struct screen_list *screen_list);
     167void draw_help(struct screen_list *screen_list);
     168void draw_lock(struct screen_list *screen_list);
     169int update_lock(int c, struct screen_list *screen_list);
    163170int validate_lock(struct screen_list *screen_list, char *user, char *pass);
    164171
    165172int close_screen_recurrent(struct screen_list*, struct recurrent* rec, void *user, long long unsigned int t);
    166173
     174/* Input to ANSI */
     175void *convert_input_ansi(unsigned int *c, int *size);
     176int  handle_command_input(struct screen_list*screen_list, unsigned int c);
     177
    167178
    168179/* Screensavers */
    169 void screensaver_init(cucul_canvas_t *cv,
    170                       caca_display_t *dp,
    171                       struct screen_list *screen_list);
    172 void screensaver_kill(cucul_canvas_t *cv,
    173                       caca_display_t *dp,
    174                       struct screen_list *screen_list);
    175 
    176 void draw_screensaver(cucul_canvas_t *cv,
    177                       caca_display_t *dp,
    178                       struct screen_list *screen_list);
    179 void screensaver_flying_toasters(cucul_canvas_t *cv,
    180                                  caca_display_t *dp,
    181                                  struct screen_list *screen_list);
    182 
    183 void screensaver_flying_toasters_init(cucul_canvas_t *cv,
    184                                  caca_display_t *dp,
    185                                  struct screen_list *screen_list);
    186 
    187 void screensaver_flying_toasters_kill(cucul_canvas_t *cv,
    188                                  caca_display_t *dp,
    189                                  struct screen_list *screen_list);
     180void screensaver_init(struct screen_list *screen_list);
     181void screensaver_kill(struct screen_list *screen_list);
     182
     183void draw_screensaver(struct screen_list *screen_list);
     184void screensaver_flying_toasters(struct screen_list *screen_list);
     185
     186void screensaver_flying_toasters_init(struct screen_list *screen_list);
     187
     188void screensaver_flying_toasters_kill(struct screen_list *screen_list);
    190189
    191190
    192191
    193192/* Recurrents */
     193int handle_recurrents(struct screen_list* screen_list);
    194194int add_recurrent(struct recurrent_list *list,
    195195                  int (*function)(struct screen_list*, struct recurrent* rec, void *user, long long unsigned int t),
Note: See TracChangeset for help on using the changeset viewer.