|
|
@@ -51,6 +51,8 @@ static void blesses_initialize (void) { |
|
|
|
|
|
|
|
fatal_failure (blesses_connection == NULL, "blesses : blesses_initialize : XCB connection is null pointer."); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Connected to X11./-\n"); |
|
|
|
|
|
|
|
blesses_screen = xcb_setup_roots_iterator (xcb_get_setup (blesses_connection)).data; |
|
|
|
|
|
|
|
blesses_window = xcb_generate_id (blesses_connection); |
|
|
@@ -66,10 +68,16 @@ static void blesses_initialize (void) { |
|
|
|
|
|
|
|
xcb_change_property (blesses_connection, XCB_PROP_MODE_REPLACE, blesses_window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, (unsigned int) string_length (blesses_window_title), blesses_window_title); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Created window./-\n"); |
|
|
|
|
|
|
|
xcb_create_pixmap (blesses_connection, blesses_screen->root_depth, blesses_pixmap, blesses_window, window_width, window_height); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Created pixmap./-\n"); |
|
|
|
|
|
|
|
xcb_create_gc (blesses_connection, blesses_context, blesses_pixmap, 0, NULL); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Created graphic context./-\n"); |
|
|
|
|
|
|
|
xcb_flush (blesses_connection); |
|
|
|
|
|
|
|
if (blesses_zoom == TRUE) { |
|
|
@@ -87,11 +95,19 @@ static void blesses_deinitialize (void) { |
|
|
|
|
|
|
|
xcb_free_gc (blesses_connection, blesses_context); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Deallocated graphic context./-\n"); |
|
|
|
|
|
|
|
xcb_free_pixmap (blesses_connection, blesses_pixmap); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Deallocated pixmap./-\n"); |
|
|
|
|
|
|
|
xcb_destroy_window (blesses_connection, blesses_window); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Deleted window./-\n"); |
|
|
|
|
|
|
|
xcb_disconnect (blesses_connection); |
|
|
|
|
|
|
|
print ("[/4XCB/-] /0Disconnected from X11./-\n"); |
|
|
|
} |
|
|
|
|
|
|
|
int blesses_active = FALSE; |
|
|
|