- Timestamp:
- Sep 18, 2010, 5:07:39 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 08263a8
- Parents:
- 1d74663
- git-author:
- David Benjamin <davidben@mit.edu> (08/07/10 16:23:50)
- git-committer:
- David Benjamin <davidben@mit.edu> (09/18/10 17:07:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
context.c
r1d74663 rcb81570 5 5 #define SET_MODE(ctx, new) ctx->mode = ((ctx->mode)&~OWL_CTX_MODE_BITS)|new 6 6 7 int owl_context_init(owl_context *ctx) 7 /* TODO: dependency from owl_context -> owl_window is annoying. */ 8 owl_context *owl_context_new(int mode, void *data, const char *keymap, owl_window *cursor) 8 9 { 9 ctx->mode = OWL_CTX_STARTUP; 10 ctx->data = NULL; 11 ctx->cursor = NULL; 12 return 0; 10 owl_context *c; 11 if (!(mode & OWL_CTX_MODE_BITS)) 12 mode |= OWL_CTX_INTERACTIVE; 13 c = owl_malloc(sizeof *c); 14 memset(c, 0, sizeof(*c)); 15 c->mode = mode; 16 c->data = data; 17 c->cursor = cursor ? g_object_ref(cursor) : NULL; 18 c->keymap = owl_strdup(keymap); 19 return c; 13 20 } 14 15 21 16 22 /* returns whether test matches the current context */
Note: See TracChangeset
for help on using the changeset viewer.