-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentry_map.h
37 lines (27 loc) · 866 Bytes
/
entry_map.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// AI prompt to generate the following struct
// {
// void* memory_address : [Display display1, Display display2, ...],
// void* memory_address : [Display display1, Display display2, ...],
// ...
// }
#ifndef ENTRY_MAP_H
#define ENTRY_MAP_H
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
#include <xcb/xcb.h>
typedef struct display_node {
xcb_connection_t *conn_ref;
char **call_trace;
int call_trace_size;
struct display_node *next;
} display_node;
typedef struct mem_dis_map {
void *memory_address;
display_node *display_refs;
struct mem_dis_map *next;
} mem_dis_map;
mem_dis_map* get_global_map();
void add_display_to_memory_address(void *memory_address, xcb_connection_t *conn_ref, char **call_trace, int call_trace_size);
void remove_display_from_memory_address(xcb_connection_t *conn_ref);
#endif