|
PatchworkOS
|
#include "start_menu.h"#include "taskbar.h"#include <libpatchwork/patchwork.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/io.h>#include <sys/proc.h>Go to the source code of this file.
Data Structures | |
| struct | start_entry_t |
Macros | |
| #define | START_ENTRY_MAX 16 |
| #define | ENTRY_AMOUNT (sizeof(entries) / sizeof(entries[0])) |
| #define | START_MENU_HEIGHT(frameSize) (frameSize + 12 * START_BUTTON_HEIGHT) |
| #define | START_MENU_YPOS_START(screenRect, panelSize, frameSize) (RECT_HEIGHT(screenRect)) |
| #define | START_MENU_YPOS_END(screenRect, panelSize, frameSize) (RECT_HEIGHT(screenRect) - START_MENU_HEIGHT(frameSize) - panelSize) |
Functions | |
| static uint64_t | startmenu_procedure (window_t *win, element_t *elem, const event_t *event) |
| window_t * | start_menu_new (window_t *taskbar, display_t *disp) |
| static void | start_menu_load_entries (window_t *startMenu) |
| void | start_menu_open (window_t *startMenu) |
| void | start_menu_close (window_t *startMenu) |
| start_menu_state_t | start_menu_get_state (window_t *startMenu) |
Variables | |
| static start_entry_t | entries [START_ENTRY_MAX] = {0} |
Definition at line 23 of file start_menu.c.
| #define START_ENTRY_MAX 16 |
Definition at line 12 of file start_menu.c.
| #define START_MENU_HEIGHT | ( | frameSize | ) | (frameSize + 12 * START_BUTTON_HEIGHT) |
Definition at line 25 of file start_menu.c.
| #define START_MENU_YPOS_END | ( | screenRect, | |
| panelSize, | |||
| frameSize | |||
| ) | (RECT_HEIGHT(screenRect) - START_MENU_HEIGHT(frameSize) - panelSize) |
Definition at line 28 of file start_menu.c.
| #define START_MENU_YPOS_START | ( | screenRect, | |
| panelSize, | |||
| frameSize | |||
| ) | (RECT_HEIGHT(screenRect)) |
Definition at line 27 of file start_menu.c.
| void start_menu_close | ( | window_t * | startMenu | ) |
Definition at line 309 of file start_menu.c.
References start_menu_t::animationStartTime, CLOCKS_PER_SEC, display_push(), element_get_private(), NULL, START_MENU_CLOSED, START_MENU_CLOSING, start_menu_t::state, start_menu_t::taskbar, TIMER_REPEAT, UEVENT_START_MENU_CLOSE, uptime(), window_get_client_element(), window_get_display(), window_get_id(), and window_set_timer().
Referenced by startmenu_procedure(), and taskbar_procedure().
| start_menu_state_t start_menu_get_state | ( | window_t * | startMenu | ) |
Definition at line 325 of file start_menu.c.
References element_get_private(), NULL, START_MENU_CLOSED, start_menu_t::state, and window_get_client_element().
Referenced by taskbar_procedure().
|
static |
Definition at line 199 of file start_menu.c.
References start_entry_t::button, button_new(), config_close(), config_get_array(), config_open(), ELEMENT_FLAT, element_free(), entries, ENTRY_AMOUNT, theme_t::frameSize, free(), config_array_t::items, config_array_t::length, start_entry_t::name, NULL, start_entry_t::path, printf(), RECT_INIT, snprintf(), START_BUTTON_HEIGHT, START_MENU_WIDTH, strcmp(), strdup(), theme, theme_global_get(), theme_t::titlebarSize, and window_get_client_element().
Referenced by start_menu_open().
Definition at line 173 of file start_menu.c.
References display_get_screen(), ERR, theme_t::frameSize, NULL, theme_t::panelSize, printf(), RECT_INIT_DIM, screenRect, theme_t::smallPadding, START_MENU_HEIGHT, START_MENU_WIDTH, START_MENU_YPOS_START, startmenu_procedure(), SURFACE_WINDOW, theme, theme_global_get(), window_free(), window_new(), WINDOW_NONE, and window_set_visible().
Referenced by taskbar_procedure().
| void start_menu_open | ( | window_t * | startMenu | ) |
Definition at line 278 of file start_menu.c.
References start_menu_t::animationStartTime, rect_t::bottom, CLOCKS_PER_SEC, display_get_screen(), element_get_private(), element_get_theme(), theme_t::frameSize, theme_t::panelSize, RECT_HEIGHT, screenRect, start_menu_load_entries(), START_MENU_OPEN, START_MENU_OPENING, START_MENU_YPOS_START, start_menu_t::state, theme, TIMER_REPEAT, rect_t::top, uptime(), window_get_client_element(), window_get_display(), window_get_rect(), window_move(), window_set_focus(), and window_set_timer().
Referenced by taskbar_procedure().
|
static |
Definition at line 31 of file start_menu.c.
References ACTION_RELEASE, start_menu_t::animationStartTime, theme_color_set_t::backgroundNormal, theme_color_set_t::backgroundSelectedEnd, theme_color_set_t::backgroundSelectedStart, rect_t::bottom, buffer, CLOCKS_NEVER, theme_t::deco, DIRECTION_VERTICAL, display_get_screen(), draw_frame(), draw_gradient(), draw_rect(), element_draw_begin(), element_draw_end(), element_get_content_rect(), element_get_private(), element_get_theme(), element_set_private(), ENOMEM, entries, ERR, errno, EVENT_TIMER, theme_t::frameSize, free(), theme_color_set_t::highlight, event_t::lAction, rect_t::left, LEVENT_ACTION, LEVENT_DEINIT, LEVENT_INIT, LEVENT_REDRAW, malloc(), MAX_PATH, NULL, theme_t::panelSize, start_entry_t::path, POPUP_OK, popup_open(), printf(), RECT_HEIGHT, RECT_SHRINK, rect_t::right, screenRect, theme_color_set_t::shadow, levent_action_t::source, spawn(), sprintf(), START_MENU_ANIMATION_TIME, start_menu_close(), START_MENU_CLOSED, START_MENU_CLOSING, START_MENU_OPEN, START_MENU_OPENING, START_MENU_YPOS_END, START_MENU_YPOS_START, start_menu_t::state, strerror(), start_menu_t::taskbar, theme, TIMER_NONE, theme_t::titlebarSize, rect_t::top, levent_action_t::type, event_t::type, uptime(), start_menu_t::win, window_get_display(), window_get_rect(), window_move(), and window_set_timer().
Referenced by start_menu_new().
|
static |
Definition at line 21 of file start_menu.c.
Referenced by pci_config_bar_get(), print_dir(), start_menu_load_entries(), and startmenu_procedure().