Changeset 1b6b2f3 for global.c


Ignore:
Timestamp:
Oct 27, 2006, 1:17:18 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e74c01c
Parents:
dd16bdd
Message:
Refactoring the editwin code somewhat, and adding the ability to hang
arbitrary reply commands off of messages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r4211f50b r1b6b2f3  
    6868  g->searchstring=NULL;
    6969  g->starttime=time(NULL); /* assumes we call init only a start time */
    70   g->buffercommand=NULL;
    7170  g->newmsgproc_pid=0;
    7271 
     
    241240
    242241void owl_global_set_buffercommand(owl_global *g, char *command) {
    243   if (g->buffercommand) owl_free(g->buffercommand);
    244   g->buffercommand=owl_strdup(command);
     242  owl_editwin_set_command(owl_global_get_typwin(g), command);
    245243}
    246244
    247245char *owl_global_get_buffercommand(owl_global *g) {
    248   if (g->buffercommand) return(g->buffercommand);
    249   return("");
    250 }
    251 
    252 void owl_global_set_buffercallback(owl_global *g, void (*cb)(char*,char*)) {
    253   g->buffercallback = cb;
    254 }
    255 
    256 void (*owl_global_get_buffercallback(owl_global *g))(char*,char*) {
    257   return g->buffercallback;
     246  return owl_editwin_get_command(owl_global_get_typwin(g));
     247}
     248
     249void owl_global_set_buffercallback(owl_global *g, void (*cb)(owl_editwin*)) {
     250  owl_editwin_set_callback(owl_global_get_typwin(g), cb);
     251}
     252
     253void (*owl_global_get_buffercallback(owl_global *g))(owl_editwin*) {
     254  return owl_editwin_get_callback(owl_global_get_typwin(g));
    258255}
    259256
Note: See TracChangeset for help on using the changeset viewer.