libxputty 0.1
Loading...
Searching...
No Matches
xchildlist.h
Go to the documentation of this file.
1/*
2 * 0BSD
3 *
4 * BSD Zero Clause License
5 *
6 * Copyright (c) 2019 Hermann Meyer
7 *
8 * Permission to use, copy, modify, and/or distribute this software for any
9 * purpose with or without fee is hereby granted.
10
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 *
19 */
20
21#pragma once
22
23#ifndef XCHILDLIST_H_
24#define XCHILDLIST_H_
25
26#include "xputty.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32
53 size_t size;
55 int cap;
57 int elem;
58};
59
66void childlist_init(Childlist_t *childlist);
67
74void childlist_destroy(Childlist_t *childlist);
75
83void childlist_add_child(Childlist_t *childlist, Widget_t *child);
84
92void childlist_remove_child(Childlist_t *childlist, Widget_t *child);
93
103int childlist_find_child(Childlist_t *childlist, Widget_t *child);
104
114int childlist_find_widget(Childlist_t *childlist, Window child_window);
115
123int childlist_has_child(Childlist_t *childlist);
124
125#ifdef __cplusplus
126}
127#endif
128
129#endif //XCHILDLISTT_H_
Childlist_t - struct to hold a Widget_t child list Xputty main holds a list of any Widget_t created...
Definition xchildlist.h:49
Widget_t ** childs
Definition xchildlist.h:51
size_t size
Definition xchildlist.h:53
Widget_t - struct to hold the basic Widget_t info.
Definition xwidget.h:457
void childlist_add_child(Childlist_t *childlist, Widget_t *child)
childlist_add_child - internal use to add a child to the Childlist_t You usually didn't need to cal...
Definition xchildlist.c:42
int childlist_find_child(Childlist_t *childlist, Widget_t *child)
childlist_find_child - find a child in a the Childlist_t this could be sued to check if a Widget_t is...
Definition xchildlist.c:69
void childlist_destroy(Childlist_t *childlist)
childlist_destroy - internal use to free the Childlist_t You usually didn't need to call this
Definition xchildlist.c:38
void childlist_remove_child(Childlist_t *childlist, Widget_t *child)
childlist_remove_child - internal use to remove a child from the childlist You usually didn't need ...
Definition xchildlist.c:55
int childlist_find_widget(Childlist_t *childlist, Window child_window)
childlist_find_widget - find a child Widget_t in a the childlist by given the Window id
Definition xchildlist.c:79
void childlist_init(Childlist_t *childlist)
childlist_init - internal use to allocate the array to min size You usually didn't need to call thi...
Definition xchildlist.c:25
int childlist_has_child(Childlist_t *childlist)
childlist_has_child - check if a Widget_t Childlist_t contain a child
Definition xchildlist.c:89
HWND Window
This file contains definitions and structs used on all platforms. Platform specific definitions are l...