summaryrefslogtreecommitdiff
path: root/src/xtoq/XtoqController.m
diff options
context:
space:
mode:
authorJess VanDerwalker <washu@sonic.net>2012-04-05 22:19:23 -0700
committerJess VanDerwalker <washu@sonic.net>2012-04-23 08:33:03 -0700
commit8b721bf867895e743f555e507a6ff9ac81b773e6 (patch)
tree288311d205e34e9419bd49175163e0ede2c35955 /src/xtoq/XtoqController.m
parent6c7523a70de6699198374bb558dc24b6aa76e474 (diff)
*.h and *.c files for input, window, context, and image.
Also prefixed public input.c, image.c and window.c functions with xcwm_input_*, xcwm_window_* and xcwm_image_*. Fixed some remaining issues with functions that were requiring both a context and window. Renamed data.h to context.h and xcwm.c to context.c - placed code in context, window, and image. Added image.c and context.c to Makefile.am. Removed data.h from project and references to it. The struct definitions previously in data.h have been moved into other files. Renamed xcwm_image_get_* to xcwm_image_copy_*. Changed calls in xtoq code to new function names. Definition of xcwm_window_t moved to window.h Signed-off-by: Jess VanDerwalker <washu@sonic.net> Reviewed by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src/xtoq/XtoqController.m')
-rw-r--r--src/xtoq/XtoqController.m13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/xtoq/XtoqController.m b/src/xtoq/XtoqController.m
index d40ccc1..c53194a 100644
--- a/src/xtoq/XtoqController.m
+++ b/src/xtoq/XtoqController.m
@@ -67,7 +67,7 @@
{
// setup X connection and get the initial image from the server
- rootContext = xcwm_init(screen);
+ rootContext = xcwm_context_open(screen);
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
@@ -149,12 +149,12 @@
xcwmDispatchQueue = dispatch_queue_create("xcwm.dispatch.queue", NULL);
// Start the event loop and set the handler function
- xcwm_start_event_loop(rootContext, (void *)eventHandler);
+ xcwm_event_start_loop(rootContext, (void *)eventHandler);
}
- (void)applicationWillTerminate:(NSNotification *)aNotification
{
- xcwm_close(rootContext);
+ xcwm_context_close(rootContext);
const char *spawn[4];
pid_t child;
@@ -466,7 +466,7 @@
window->local_data = (id)newWindow;
// get image to darw
- xcbImage = test_xcwm_get_image(window);
+ xcbImage = xcwm_image_copy_damaged(window);
imageRep = [[XtoqImageRep alloc] initWithData: xcbImage x: 0 y: 0];
// draw the image into a rect
@@ -508,8 +508,7 @@
//use dispatch_async() to handle the actual close
dispatch_async(xcwmDispatchQueue, ^{
NSLog (@"Call xcwm_request_close(theContext)");
- xcwm_request_close (rootContext,
- [aWindow getXcwmWindow]);
+ xcwm_window_request_close ([aWindow getXcwmWindow]);
});
}
@@ -553,7 +552,7 @@
int width = (int)moveFrame.size.width;
int height = (int)moveFrame.size.height - WINDOWBAR;
- xcwm_configure_window(rootContext, window,
+ xcwm_window_configure(window,
x, y - height, height, width);
[[moveWindow contentView] setNeedsDisplay: YES];
}