marco 1.29.1
Window manager
Loading...
Searching...
No Matches
async-getprop.c File Reference
View source
#include <assert.h>
#include "async-getprop.h"
#include <X11/Xlibint.h>
Include dependency graph for async-getprop.c:

Data Structures

struct  _ListNode
 
struct  _AgGetPropertyTask
 
struct  _AgPerDisplayData
 

Macros

#define NEED_REPLIES
 
#define NULL   ((void*)0)
 
#define ALIGN_VALUE(this, boundary)    (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
 

Typedefs

typedef struct _ListNode ListNode
 
typedef struct _AgPerDisplayData AgPerDisplayData
 

Functions

static void append_to_list (ListNode **head, ListNode **tail, ListNode *task)
 
static void remove_from_list (ListNode **head, ListNode **tail, ListNode *task)
 
static void move_to_completed (AgPerDisplayData *dd, AgGetPropertyTask *task)
 
static AgGetPropertyTask * find_pending_by_request_sequence (AgPerDisplayData *dd, unsigned long request_seq)
 
static Bool async_get_property_handler (Display *dpy, xReply *rep, char *buf, int len, XPointer data)
 
static AgPerDisplayData * get_display_data (Display *display, Bool create)
 
static void maybe_free_display_data (AgPerDisplayData *dd)
 
AgGetPropertyTask * ag_task_create (Display *dpy, Window window, Atom property, long offset, long length, Bool delete, Atom req_type)
 
static void free_task (AgGetPropertyTask *task)
 
Status ag_task_get_reply_and_free (AgGetPropertyTask *task, Atom *actual_type, int *actual_format, unsigned long *nitems, unsigned long *bytesafter, unsigned char **prop)
 
Bool ag_task_have_reply (AgGetPropertyTask *task)
 
Atom ag_task_get_property (AgGetPropertyTask *task)
 
Window ag_task_get_window (AgGetPropertyTask *task)
 
Display * ag_task_get_display (AgGetPropertyTask *task)
 
AgGetPropertyTask * ag_get_next_completed_task (Display *display)
 
void * ag_Xmalloc (unsigned long bytes)
 
void * ag_Xmalloc0 (unsigned long bytes)
 

Variables

static ListNode * display_datas = NULL
 
static ListNode * display_datas_tail = NULL
 

Macro Definition Documentation

◆ ALIGN_VALUE

#define ALIGN_VALUE (   this,
  boundary 
)     (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))

◆ NEED_REPLIES

#define NEED_REPLIES

◆ NULL

#define NULL   ((void*)0)

Typedef Documentation

◆ AgPerDisplayData

◆ ListNode

typedef struct _ListNode ListNode

Function Documentation

◆ ag_get_next_completed_task()

AgGetPropertyTask * ag_get_next_completed_task ( Display *  display)

References _AgPerDisplayData::completed_tasks, get_display_data(), _AgPerDisplayData::n_tasks_completed, _AgPerDisplayData::n_tasks_pending, and NULL.

Referenced by main(), meta_prop_get_values(), and run_speed_comparison().

Here is the call graph for this function:

◆ ag_task_create()

AgGetPropertyTask * ag_task_create ( Display *  dpy,
Window  window,
Atom  property,
long  offset,
long  length,
Bool  delete,
Atom  req_type 
)

◆ ag_task_get_display()

Display * ag_task_get_display ( AgGetPropertyTask *  task)

◆ ag_task_get_property()

Atom ag_task_get_property ( AgGetPropertyTask *  task)

References _AgGetPropertyTask::property.

Referenced by try_get_reply().

◆ ag_task_get_reply_and_free()

Status ag_task_get_reply_and_free ( AgGetPropertyTask *  task,
Atom *  actual_type,
int *  actual_format,
unsigned long *  nitems,
unsigned long *  bytesafter,
unsigned char **  prop 
)

◆ ag_task_get_window()

Window ag_task_get_window ( AgGetPropertyTask *  task)

References _AgGetPropertyTask::window.

Referenced by try_get_reply().

◆ ag_task_have_reply()

Bool ag_task_have_reply ( AgGetPropertyTask *  task)

◆ ag_Xmalloc()

void * ag_Xmalloc ( unsigned long  bytes)

◆ ag_Xmalloc0()

void * ag_Xmalloc0 ( unsigned long  bytes)

Referenced by wm_hints_from_results().

◆ append_to_list()

static void append_to_list ( ListNode **  head,
ListNode **  tail,
ListNode *  task 
)
static

◆ async_get_property_handler()

static Bool async_get_property_handler ( Display *  dpy,
xReply *  rep,
char *  buf,
int  len,
XPointer  data 
)
static

◆ find_pending_by_request_sequence()

static AgGetPropertyTask * find_pending_by_request_sequence ( AgPerDisplayData *  dd,
unsigned long  request_seq 
)
static

◆ free_task()

static void free_task ( AgGetPropertyTask *  task)
static

References _AgPerDisplayData::completed_tasks, _AgPerDisplayData::completed_tasks_tail, _AgGetPropertyTask::dd, maybe_free_display_data(), _AgPerDisplayData::n_tasks_completed, _AgGetPropertyTask::node, and remove_from_list().

Referenced by ag_task_get_reply_and_free().

Here is the call graph for this function:

◆ get_display_data()

static AgPerDisplayData * get_display_data ( Display *  display,
Bool  create 
)
static

References append_to_list(), _AgPerDisplayData::async, async_get_property_handler(), _AgPerDisplayData::display, display_datas, display_datas_tail, _ListNode::next, _AgPerDisplayData::node, and NULL.

Referenced by ag_get_next_completed_task(), and ag_task_create().

Here is the call graph for this function:

◆ maybe_free_display_data()

static void maybe_free_display_data ( AgPerDisplayData *  dd)
static

References _AgPerDisplayData::async, _AgPerDisplayData::completed_tasks, _AgPerDisplayData::display, display_datas, display_datas_tail, _AgPerDisplayData::node, NULL, _AgPerDisplayData::pending_tasks, and remove_from_list().

Referenced by free_task().

Here is the call graph for this function:

◆ move_to_completed()

static void move_to_completed ( AgPerDisplayData *  dd,
AgGetPropertyTask *  task 
)
static

◆ remove_from_list()

static void remove_from_list ( ListNode **  head,
ListNode **  tail,
ListNode *  task 
)
static

Variable Documentation

◆ display_datas

ListNode* display_datas = NULL
static

◆ display_datas_tail

ListNode* display_datas_tail = NULL
static