XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
main.cpp File Reference
#include <stdint.h>
#include <_xeneva.h>
#include <stdio.h>
#include <sys/_keproc.h>
#include <sys/_kefile.h>
#include <sys/iocodes.h>
#include <chitralekha.h>
#include <widgets/base.h>
#include <widgets/button.h>
#include <widgets/window.h>
#include <widgets/menu.h>
#include <sys/time.h>
#include <signal.h>
#include <unistd.h>
#include <keycode.h>
#include <widgets/menubar.h>
#include <widgets/msgbox.h>
#include <string.h>
#include <stdlib.h>
#include "calculator.h"
#include <sys/mman.h>
#include <pthread.h>
Include dependency graph for main.cpp:

Macros

#define CALCULATOR_BACK_COLOR   0xFF353535
 
#define CALC_DISPLAY_DARK   0xFF6598DE
 
#define CALC_DISPLAY_LIGHT   0xFF8BADDC
 
#define MAX_DIGIT   1024
 

Functions

void CalcDisplayDraw (ChWidget *wid, ChWindow *win)
 
void CalcUpdateDisplay (CalculatorDisplay *disp)
 
void CalcClearOutput (CalculatorDisplay *disp)
 
CalculatorDisplay * CalculatorGetMainDisplay ()
 
CalculatorDisplay * CalcCreateDisplay (int x, int y, int w, int h)
 
void CalculatorProcess (CalculatorDisplay *calc)
 
void CalcAddDigit (CalculatorDisplay *disp, int number)
 
void CalcRemoveDigit (CalculatorDisplay *disp)
 
void CalcAddToHistory (CalculatorDisplay *disp, char *num, uint8_t operator_)
 
void CalcClearHistory (CalculatorDisplay *disp)
 
void CalcAllClear (CalculatorDisplay *disp)
 
void WindowHandleMessage (PostEvent *e)
 
void CalculatorCreateButtonGird (ChWindow *win)
 
void CalculatorClose (ChWindow *win, ChWinGlobalControl *ctl)
 
void CalculatorAboutBox (ChWidget *widget, ChWindow *win)
 
void PopupWindowMouseEventTest (ChWidget *widget, ChWindow *win, int x, int y, int button)
 
int main (int argc, char *argv[])
 

Variables

ChitralekhaApp * app
 
ChWindow * mainWin
 
ChFont * dispFont
 
CalculatorDisplay * mainDisp
 

Macro Definition Documentation

◆ CALC_DISPLAY_DARK

#define CALC_DISPLAY_DARK   0xFF6598DE

◆ CALC_DISPLAY_LIGHT

#define CALC_DISPLAY_LIGHT   0xFF8BADDC

◆ CALCULATOR_BACK_COLOR

#define CALCULATOR_BACK_COLOR   0xFF353535

◆ MAX_DIGIT

#define MAX_DIGIT   1024

Function Documentation

◆ CalcAddDigit()

void CalcAddDigit ( CalculatorDisplay *  disp,
int  number 
)

◆ CalcAddToHistory()

void CalcAddToHistory ( CalculatorDisplay *  disp,
char *  num,
uint8_t  operator_ 
)

◆ CalcAllClear()

void CalcAllClear ( CalculatorDisplay *  disp)

◆ CalcClearHistory()

void CalcClearHistory ( CalculatorDisplay *  disp)

◆ CalcClearOutput()

void CalcClearOutput ( CalculatorDisplay *  disp)

◆ CalcCreateDisplay()

CalculatorDisplay * CalcCreateDisplay ( int  x,
int  y,
int  w,
int  h 
)

◆ CalcDisplayDraw()

void CalcDisplayDraw ( ChWidget *  wid,
ChWindow *  win 
)

◆ CalcRemoveDigit()

void CalcRemoveDigit ( CalculatorDisplay *  disp)

◆ CalculatorAboutBox()

void CalculatorAboutBox ( ChWidget *  widget,
ChWindow *  win 
)

◆ CalculatorClose()

void CalculatorClose ( ChWindow *  win,
ChWinGlobalControl *  ctl 
)

◆ CalculatorCreateButtonGird()

void CalculatorCreateButtonGird ( ChWindow *  win)

◆ CalculatorGetMainDisplay()

CalculatorDisplay * CalculatorGetMainDisplay ( )

◆ CalculatorProcess()

void CalculatorProcess ( CalculatorDisplay *  calc)

◆ CalcUpdateDisplay()

void CalcUpdateDisplay ( CalculatorDisplay *  disp)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ PopupWindowMouseEventTest()

void PopupWindowMouseEventTest ( ChWidget *  widget,
ChWindow *  win,
int  x,
int  y,
int  button 
)

◆ WindowHandleMessage()

void WindowHandleMessage ( PostEvent *  e)

Variable Documentation

◆ app

BSD 2-Clause License

Copyright (c) 2022, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ dispFont

ChFont* dispFont

◆ mainDisp

CalculatorDisplay* mainDisp

◆ mainWin

ChWindow* mainWin