XenevaOS
Loading...
Searching...
No Matches
Macros | Functions
window.cpp File Reference
#include "window.h"
#include "..\_fastcpy.h"
#include <sys\_kefile.h>
#include <sys\_keproc.h>
#include "menu.h"
#include <sys\mman.h>
Include dependency graph for window.cpp:

Macros

#define WINDOW_DEFAULT_TITLEBAR_HEIGHT   26
 
#define WINDOW_DEFAULT_BACKGROUND   0xFFD2D2D2
 

Functions

void ChDefaultWinPaint (ChWindow *win)
 
void ChWindowPaintCloseButton (ChWindow *win, ChWinGlobalControl *button)
 
void ChWindowPaintMaximButton (ChWindow *win, ChWinGlobalControl *button)
 
void ChWindowPaintMinimButton (ChWindow *win, ChWinGlobalControl *button)
 
void ChWindowPaintTitlebar (ChWindow *win)
 
void ChDefaultPopupWinPaint (ChWindow *win)
 
void ChRequestWindow (ChitralekhaApp *app, int x, int y, int w, int h, char *title, uint16_t attrib, int handle)
 
void ChGlobalCtlMouseHandler (ChWindow *win, ChWinGlobalControl *global, int x, int y, int button)
 
XE_EXTERN XE_EXPORT ChWinGlobalControlChCreateGlobalButton (ChWindow *win, int x, int y, int w, int h, uint8_t type)
 
void ChGlobalCloseAction (ChWindow *win, ChWinGlobalControl *ctl)
 
void ChGlobalMinimiseAction (ChWindow *win, ChWinGlobalControl *ctl)
 
XE_EXTERN XE_EXPORT ChWindowChCreateWindow (ChitralekhaApp *app, uint16_t attrib, char *title, int x, int y, int w, int h)
 
XE_EXTERN XE_EXPORT void ChWindowBroadcastIcon (ChitralekhaApp *app, char *iconfile)
 
XE_EXTERN XE_EXPORT void ChWindowUpdate (ChWindow *win, int x, int y, int w, int h, bool updateEntireWin, bool dirty)
 
XE_EXTERN XE_EXPORT void ChWindowPaint (ChWindow *win)
 
XE_EXTERN XE_EXPORT void ChWindowAddSubWindow (ChWindow *parent, ChWindow *win)
 
XE_EXTERN XE_EXPORT ChWindowChGetWindowByHandle (ChWindow *mainWin, int handle)
 
XE_EXTERN XE_EXPORT ChWindowChGetPopupWindowByHandle (ChWindow *mainWin, int handle)
 
XE_EXTERN XE_EXPORT void ChWindowHide (ChWindow *win)
 
XE_EXTERN XE_EXPORT uint32_t ChGetWindowHandle (ChitralekhaApp *app, char *title)
 
XE_EXTERN XE_EXPORT void ChWindowSetFocused (ChWindow *win)
 
XE_EXTERN XE_EXPORT void ChWindowHandleMouse (ChWindow *win, int x, int y, int button)
 
XE_EXTERN XE_EXPORT void ChWindowHandleTouch (ChWindow *win, int x, int y, int button)
 
XE_EXTERN XE_EXPORT void ChPopupWindowHandleMouse (ChWindow *win, int x, int y, int button)
 
XE_EXTERN XE_EXPORT void ChWindowHandleFocus (ChWindow *win, bool focus_val, uint32_t handle)
 
XE_EXTERN XE_EXPORT void ChWindowAddWidget (ChWindow *win, ChWidget *wid)
 
XE_EXTERN XE_EXPORT void ChWindowRegisterJump (ChWindow *win)
 
XE_EXTERN XE_EXPORT void ChWindowSetFlags (ChWindow *win, uint16_t flags)
 
XE_EXTERN XE_EXPORT void ChWindowMove (ChWindow *win, int newX, int newY)
 
void ChFreeWindowResources (ChWindow *win)
 
XE_EXTERN XE_EXPORT void ChPopupWindowClose (ChWindow *win)
 
XE_EXTERN XE_EXPORT void ChWindowCloseWindow (ChWindow *win)
 
uint32_t ChWindowGetBackgroundColor (ChWindow *win)
 
XE_EXTERN XE_EXPORT ChWindowChCreatePopupWindow (ChWindow *win, int x, int y, int w, int h, uint16_t flags, char *title)
 
XE_EXTERN XE_EXPORT void ChPopupWindowUpdate (ChPopupWindow *pw, int x, int y, int w, int h)
 
XE_EXTERN XE_EXPORT void ChPopupWindowShow (ChWindow *pw, ChWindow *win)
 
XE_EXTERN XE_EXPORT void ChPopupWindowUpdateLocation (ChWindow *pwin, ChWindow *win, int x, int y)
 
XE_EXTERN XE_EXPORT void ChPopupWindowHide (ChWindow *pw, ChWindow *parent)
 

Macro Definition Documentation

◆ WINDOW_DEFAULT_BACKGROUND

#define WINDOW_DEFAULT_BACKGROUND   0xFFD2D2D2

◆ WINDOW_DEFAULT_TITLEBAR_HEIGHT

#define WINDOW_DEFAULT_TITLEBAR_HEIGHT   26

BSD 2-Clause License

Copyright (c) 2022-2023, 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.

Function Documentation

◆ ChCreateGlobalButton()

XE_EXTERN XE_EXPORT ChWinGlobalControl * ChCreateGlobalButton ( ChWindow win,
int  x,
int  y,
int  w,
int  h,
uint8_t  type 
)

◆ ChCreatePopupWindow()

XE_EXTERN XE_EXPORT ChWindow * ChCreatePopupWindow ( ChWindow win,
int  x,
int  y,
int  w,
int  h,
uint16_t  flags,
char *  title 
)

◆ ChCreateWindow()

XE_EXTERN XE_EXPORT ChWindow * ChCreateWindow ( ChitralekhaApp app,
uint16_t  attrib,
char *  title,
int  x,
int  y,
int  w,
int  h 
)

◆ ChDefaultPopupWinPaint()

void ChDefaultPopupWinPaint ( ChWindow win)
extern

◆ ChDefaultWinPaint()

void ChDefaultWinPaint ( ChWindow win)
extern

◆ ChFreeWindowResources()

void ChFreeWindowResources ( ChWindow win)

◆ ChGetPopupWindowByHandle()

XE_EXTERN XE_EXPORT ChWindow * ChGetPopupWindowByHandle ( ChWindow mainWin,
int  handle 
)

◆ ChGetWindowByHandle()

XE_EXTERN XE_EXPORT ChWindow * ChGetWindowByHandle ( ChWindow mainWin,
int  handle 
)

◆ ChGetWindowHandle()

XE_EXTERN XE_EXPORT uint32_t ChGetWindowHandle ( ChitralekhaApp app,
char *  title 
)

◆ ChGlobalCloseAction()

void ChGlobalCloseAction ( ChWindow win,
ChWinGlobalControl ctl 
)

◆ ChGlobalCtlMouseHandler()

void ChGlobalCtlMouseHandler ( ChWindow win,
ChWinGlobalControl global,
int  x,
int  y,
int  button 
)

◆ ChGlobalMinimiseAction()

void ChGlobalMinimiseAction ( ChWindow win,
ChWinGlobalControl ctl 
)

◆ ChPopupWindowClose()

XE_EXTERN XE_EXPORT void ChPopupWindowClose ( ChWindow win)

◆ ChPopupWindowHandleMouse()

XE_EXTERN XE_EXPORT void ChPopupWindowHandleMouse ( ChWindow win,
int  x,
int  y,
int  button 
)

◆ ChPopupWindowHide()

XE_EXTERN XE_EXPORT void ChPopupWindowHide ( ChWindow pw,
ChWindow parent 
)

◆ ChPopupWindowShow()

XE_EXTERN XE_EXPORT void ChPopupWindowShow ( ChWindow pw,
ChWindow win 
)

◆ ChPopupWindowUpdate()

XE_EXTERN XE_EXPORT void ChPopupWindowUpdate ( ChPopupWindow pw,
int  x,
int  y,
int  w,
int  h 
)

◆ ChPopupWindowUpdateLocation()

XE_EXTERN XE_EXPORT void ChPopupWindowUpdateLocation ( ChWindow pwin,
ChWindow win,
int  x,
int  y 
)

◆ ChRequestWindow()

void ChRequestWindow ( ChitralekhaApp app,
int  x,
int  y,
int  w,
int  h,
char *  title,
uint16_t  attrib,
int  handle 
)

◆ ChWindowAddSubWindow()

XE_LIB void ChWindowAddSubWindow ( ChWindow parent,
ChWindow win 
)

◆ ChWindowAddWidget()

XE_EXTERN XE_EXPORT void ChWindowAddWidget ( ChWindow win,
ChWidget wid 
)

◆ ChWindowBroadcastIcon()

XE_EXTERN XE_EXPORT void ChWindowBroadcastIcon ( ChitralekhaApp app,
char *  iconfile 
)

◆ ChWindowCloseWindow()

XE_EXTERN XE_EXPORT void ChWindowCloseWindow ( ChWindow win)

◆ ChWindowGetBackgroundColor()

uint32_t ChWindowGetBackgroundColor ( ChWindow win)

◆ ChWindowHandleFocus()

XE_EXTERN XE_EXPORT void ChWindowHandleFocus ( ChWindow win,
bool  focus_val,
uint32_t  handle 
)

◆ ChWindowHandleMouse()

XE_EXTERN XE_EXPORT void ChWindowHandleMouse ( ChWindow win,
int  x,
int  y,
int  button 
)

◆ ChWindowHandleTouch()

XE_EXTERN XE_EXPORT void ChWindowHandleTouch ( ChWindow win,
int  x,
int  y,
int  button 
)

◆ ChWindowHide()

XE_EXTERN XE_EXPORT void ChWindowHide ( ChWindow win)

◆ ChWindowMove()

XE_EXTERN XE_EXPORT void ChWindowMove ( ChWindow win,
int  newX,
int  newY 
)

◆ ChWindowPaint()

XE_EXTERN XE_EXPORT void ChWindowPaint ( ChWindow win)

◆ ChWindowPaintCloseButton()

void ChWindowPaintCloseButton ( ChWindow win,
ChWinGlobalControl button 
)
extern

BSD 2-Clause License

Copyright (c) 2022-2023, 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.

◆ ChWindowPaintMaximButton()

void ChWindowPaintMaximButton ( ChWindow win,
ChWinGlobalControl button 
)
extern

◆ ChWindowPaintMinimButton()

void ChWindowPaintMinimButton ( ChWindow win,
ChWinGlobalControl button 
)
extern

◆ ChWindowPaintTitlebar()

void ChWindowPaintTitlebar ( ChWindow win)
extern

◆ ChWindowRegisterJump()

XE_EXTERN XE_EXPORT void ChWindowRegisterJump ( ChWindow win)

◆ ChWindowSetFlags()

XE_EXTERN XE_EXPORT void ChWindowSetFlags ( ChWindow win,
uint16_t  flags 
)

◆ ChWindowSetFocused()

XE_EXTERN XE_EXPORT void ChWindowSetFocused ( ChWindow win)

◆ ChWindowUpdate()

XE_EXTERN XE_EXPORT void ChWindowUpdate ( ChWindow win,
int  x,
int  y,
int  w,
int  h,
bool  updateEntireWin,
bool  dirty 
)