57 uint64_t availLength = lastAvailPos - firstAvailPos;
119 if (entry->
info.
id == surface)
143 printf(
"taskbar: failed to update clock label\n");
164 printf(
"taskbar: failed to create start button\n");
171 printf(
"taskbar: failed to create clock label\n");
179 printf(
"taskbar: failed to update clock\n");
186 printf(
"taskbar: failed to allocate taskbar private data\n");
320 entry->
info =
event->globalReport.info;
356 printf(
"taskbar: failed to open klog\n");
361 printf(
"taskbar: failed to redirect stdout/stderr to klog\n");
374 printf(
"taskbar: failed to subscribe to global events\n");
381 printf(
"taskbar: failed to create taskbar window\n");
387 printf(
"taskbar: failed to show taskbar window\n");
#define MAX_PATH
Maximum length of filepaths.
uint64_t display_get_screen(display_t *disp, rect_t *rect, uint64_t index)
Get the rectangle of a screen.
uint64_t display_subscribe(display_t *disp, event_type_t type)
Subscribe to events of a specific type.
uint64_t display_set_is_visible(display_t *disp, surface_id_t id, bool isVisible)
Set the visibility of a surface.
void draw_rect(drawable_t *draw, const rect_t *rect, pixel_t pixel)
Draw a filled rectangle.
void draw_separator(drawable_t *draw, const rect_t *rect, pixel_t highlight, pixel_t shadow, direction_t direction)
Draw a separator line.
void element_set_private(element_t *elem, void *private)
Set private data for an element.
element_t * element_find(element_t *elem, element_id_t id)
Find a child element by its ID.
uint64_t element_emit(element_t *elem, event_type_t type, const void *data, uint64_t size)
Emit an event to an element.
theme_t * element_get_theme(element_t *elem)
Get the theme of an element.
#define ELEMENT_NO_OUTLINE
void element_draw_end(element_t *elem, drawable_t *draw)
End drawing to an element.
rect_t element_get_content_rect(element_t *elem)
Get the element's rectangle in local coordinates.
void element_draw_begin(element_t *elem, drawable_t *draw)
Begin drawing to an element.
void element_free(element_t *elem)
Deinitialize and free an element and all its children.
void element_redraw(element_t *elem, bool shouldPropagate)
Redraw an element.
uint64_t element_set_text(element_t *elem, const char *text)
Set the text of an element.
void element_move(element_t *elem, const rect_t *rect)
Move an element to a new rectangle in its parent's coordinate space.
void element_force_action(element_t *elem, action_type_t action)
Force an action on an element.
void * element_get_private(element_t *elem)
Get private data for an element.
#define LEVENT_FORCE_ACTION
theme_t * theme_global_get(void)
Get the global theme.
uint64_t window_set_visible(window_t *win, bool isVisible)
Set the visibility of the window.
uint64_t window_set_timer(window_t *win, timer_flags_t flags, clock_t timeout)
Set the window timer.
window_t * window_new(display_t *disp, const char *name, const rect_t *rect, surface_type_t type, window_flags_t flags, procedure_t procedure, void *private)
Allocate and initialize a new window.
void window_free(window_t *win)
Free a window.
display_t * window_get_display(window_t *win)
Get the display associated with the window.
#define ENOMEM
Out of memory.
#define errno
Error number variable.
fd_t dup2(fd_t oldFd, fd_t newFd)
System call for duplicating file descriptors, with a destination.
fd_t open(const char *path)
System call for opening files.
uint64_t close(fd_t fd)
System call for closing files.
@ KBD_LEFT_SUPER
Left Super key.
@ KBD_RELEASE
Key release event.
#define LIST_FOR_EACH(elem, list, member)
Iterates over a list.
static uint64_t list_length(list_t *list)
Gets the length of the list.
#define LIST_FOR_EACH_SAFE(elem, temp, list, member)
Safely iterates over a list, allowing for element removal during iteration.
static void list_remove(list_t *list, list_entry_t *entry)
Removes a list entry from its current list.
static void list_push(list_t *list, list_entry_t *entry)
Pushes an entry to the end of the list.
static void list_entry_init(list_entry_t *entry)
Initializes a list entry.
static void list_init(list_t *list)
Initializes a list.
#define NULL
Pointer error value.
#define ERR
Integer error value.
__UINT64_TYPE__ fd_t
A file descriptor.
EFI_PHYSICAL_ADDRESS buffer
static uint64_t entryCount
#define RECT_INIT_DIM(x, y, width, height)
#define RECT_HEIGHT(rect)
_PUBLIC int printf(const char *_RESTRICT format,...)
_PUBLIC int sprintf(char *_RESTRICT s, const char *_RESTRICT format,...)
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
_PUBLIC char * strcpy(char *_RESTRICT s1, const char *_RESTRICT s2)
_PUBLIC int strcmp(const char *s1, const char *s2)
Opaque display structure.
Opaque element structure.
gevent_detach_t globalDetach
gevent_report_t globalReport
gevent_attach_t globalAttach
Library Force Action event.
static rect_t taskbar_get_clock_rect(element_t *elem)
static rect_t taskbar_get_left_separator_rect(element_t *elem)
static rect_t taskbar_get_start_rect(element_t *elem)
static uint64_t taskbar_procedure(window_t *win, element_t *elem, const event_t *event)
static void taskbar_entry_add(taskbar_t *taskbar, element_t *elem, const surface_info_t *info, const char *name)
static rect_t taskbar_get_task_button_rect(taskbar_t *taskbar, element_t *elem, uint64_t index)
static rect_t taskbar_get_right_separator_rect(element_t *elem)
static uint64_t taskbar_update_clock(element_t *elem)
static void taskbar_reposition_task_buttons(taskbar_t *taskbar, element_t *elem)
static void taskbar_entry_remove(taskbar_t *taskbar, element_t *elem, surface_id_t surface)
window_t * taskbar_new(display_t *disp)
#define TASK_BUTTON_MAX_WIDTH
_PUBLIC time_t time(time_t *timer)
_PUBLIC struct tm * localtime_r(const time_t *timer, struct tm *buf)
long long unsigned time_t