Changeset 2a17b63 for context.c


Ignore:
Timestamp:
Jan 7, 2010, 6:54:15 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
10557e6
Parents:
a999d9e
git-author:
Nelson Elhage <nelhage@mit.edu> (12/30/09 17:52:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/07/10 18:54:15)
Message:
Push and pop contexts whenever we change context.

This allows us to get rid of the awful hack in owl_process_input_char,
and opens the path to being able to invoke popup windows from the
editwin and vice versa (In fact, you can now do so without
segfaulting, although the display layer does not yet quite do the
right thing).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • context.c

    r3f8514b r2a17b63  
    5252  return(ctx->mode & OWL_CTX_INTERACTIVE)?1:0;
    5353}
    54 
    55 void owl_context_set_startup(owl_context *ctx)
    56 {
    57   SET_MODE(ctx, OWL_CTX_STARTUP);
    58 }
    59 
    60 void owl_context_set_readconfig(owl_context *ctx)
    61 {
    62   SET_MODE(ctx, OWL_CTX_READCONFIG);
    63 }
    64 
    65 void owl_context_set_interactive(owl_context *ctx)
    66 {
    67   SET_MODE(ctx, OWL_CTX_INTERACTIVE);
    68 }
    69 
    70 void owl_context_set_popless(owl_context *ctx, owl_viewwin *vw)
    71 {
    72   ctx->data = vw;
    73   SET_ACTIVE(ctx, OWL_CTX_POPLESS);
    74 }
    75 
    76 void owl_context_set_recv(owl_context *ctx)
    77 {
    78   SET_ACTIVE(ctx, OWL_CTX_RECV);
    79 }
    80 
    81 void owl_context_set_editmulti(owl_context *ctx, owl_editwin *ew)
    82 {
    83   ctx->data = ew;
    84   SET_ACTIVE(ctx, OWL_CTX_EDITMULTI);
    85 }
    86 
    87 void owl_context_set_editline(owl_context *ctx, owl_editwin *ew)
    88 {
    89   ctx->data = ew;
    90   SET_ACTIVE(ctx, OWL_CTX_EDITLINE);
    91 }
    92 
    93 void owl_context_set_editresponse(owl_context *ctx, owl_editwin *ew)
    94 {
    95   ctx->data = ew;
    96   SET_ACTIVE(ctx, OWL_CTX_EDITRESPONSE);
    97 }
    98 
Note: See TracChangeset for help on using the changeset viewer.