PatchworkOS
Loading...
Searching...
No Matches
start_menu.c File Reference
#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_tstart_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}
 

Macro Definition Documentation

◆ ENTRY_AMOUNT

#define ENTRY_AMOUNT   (sizeof(entries) / sizeof(entries[0]))

Definition at line 23 of file start_menu.c.

◆ START_ENTRY_MAX

#define START_ENTRY_MAX   16

Definition at line 12 of file start_menu.c.

◆ START_MENU_HEIGHT

#define START_MENU_HEIGHT (   frameSize)    (frameSize + 12 * START_BUTTON_HEIGHT)

Definition at line 25 of file start_menu.c.

◆ START_MENU_YPOS_END

#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.

◆ START_MENU_YPOS_START

#define START_MENU_YPOS_START (   screenRect,
  panelSize,
  frameSize 
)    (RECT_HEIGHT(screenRect))

Definition at line 27 of file start_menu.c.

Function Documentation

◆ start_menu_close()

◆ start_menu_get_state()

start_menu_state_t start_menu_get_state ( window_t startMenu)

◆ start_menu_load_entries()

◆ start_menu_new()

◆ start_menu_open()

◆ startmenu_procedure()

Variable Documentation

◆ entries

start_entry_t entries[START_ENTRY_MAX] = {0}
static