XenevaOS
Loading...
Searching...
No Matches
XenevaOS
Process
XELnch
button.h
Go to the documentation of this file.
1
30
#ifndef __BUTTON_H__
31
#define __BUTTON_H__
32
33
#include <stdint.h>
34
#include <stdarg.h>
35
#include <
chitralekha.h
>
36
#include <
widgets\window.h
>
37
38
typedef
struct
_ButtonIcon_
{
39
char
*
filename
;
40
int
iconWidth
;
41
int
iconHeight
;
42
int
iconBpp
;
43
int
iconFd
;
44
uint8_t
*
fileBuffer
;
45
uint8_t
*
imageData
;
46
uint32_t
fileSize
;
47
int
usageCount
;
48
}
ButtonIcon
;
49
50
typedef
struct
_button_
{
51
int
x
;
52
int
y
;
53
int
w
;
54
int
h
;
55
int
last_mouse_x
;
56
int
last_mouse_y
;
57
bool
clicked
;
58
bool
hover
;
59
bool
hover_painted
;
60
bool
kill_focus
;
61
char
*
title
;
62
char
*
appname
;
63
char
*
param
;
64
bool
focused
;
65
ButtonIcon
*
buttonIcon
;
66
void(*
actionHandler
)(
_button_
* button,
ChWindow
*);
67
void(*
mouseEvent
)(
_button_
* button,
ChWindow
*
win
,
int
x
,
int
y
,
int
but);
68
void(*
drawLaunchButton
)(
_button_
* button,
ChWindow
*
win
);
69
void(*
destroy
)(
_button_
* button,
ChWindow
*
win
);
70
}
LaunchButton
;
71
72
/*
73
* CreateLaunchButton -- creates a new launch button
74
* @param x -- X coordinate, if no grid, it needs to set manually
75
* @param y -- Y coordinate, if no grid, it needs to set manually
76
* @param w -- width of the button
77
* @param h -- height of the button
78
* @param title -- title of the button
79
* @param appname -- name of the application associated with this
80
* button
81
*/
82
LaunchButton
*
CreateLaunchButton
(
int
x,
int
y,
int
w,
int
h,
char
* title,
char
* appname);
83
84
ButtonIcon
*
CreateLaunchButtonIcon
(
char
* iconfile,
LaunchButton
* button);
85
86
#endif
window.h
CreateLaunchButtonIcon
ButtonIcon * CreateLaunchButtonIcon(char *iconfile, LaunchButton *button)
Definition
button.cpp:173
CreateLaunchButton
LaunchButton * CreateLaunchButton(int x, int y, int w, int h, char *title, char *appname)
Definition
button.cpp:153
LaunchButton
struct _button_ LaunchButton
ButtonIcon
struct _ButtonIcon_ ButtonIcon
uint32_t
unsigned int uint32_t
Definition
acefiex.h:163
uint8_t
unsigned char uint8_t
Definition
acefiex.h:161
chitralekha.h
win
ChWindow * win
Definition
namdapha.cpp:45
_ButtonIcon_
Definition
button.h:38
_ButtonIcon_::usageCount
int usageCount
Definition
button.h:47
_ButtonIcon_::filename
char * filename
Definition
button.h:39
_ButtonIcon_::iconBpp
int iconBpp
Definition
button.h:42
_ButtonIcon_::fileSize
uint32_t fileSize
Definition
button.h:46
_ButtonIcon_::iconWidth
int iconWidth
Definition
button.h:40
_ButtonIcon_::fileBuffer
uint8_t * fileBuffer
Definition
button.h:44
_ButtonIcon_::iconFd
int iconFd
Definition
button.h:43
_ButtonIcon_::imageData
uint8_t * imageData
Definition
button.h:45
_ButtonIcon_::iconHeight
int iconHeight
Definition
button.h:41
_button_
Definition
button.h:50
_button_::appname
char * appname
Definition
button.h:62
_button_::w
int w
Definition
button.h:53
_button_::destroy
void(* destroy)(_button_ *button, ChWindow *win)
Definition
button.h:69
_button_::actionHandler
void(* actionHandler)(_button_ *button, ChWindow *)
Definition
button.h:66
_button_::drawLaunchButton
void(* drawLaunchButton)(_button_ *button, ChWindow *win)
Definition
button.h:68
_button_::buttonIcon
ButtonIcon * buttonIcon
Definition
button.h:65
_button_::param
char * param
Definition
button.h:63
_button_::last_mouse_y
int last_mouse_y
Definition
button.h:56
_button_::y
int y
Definition
button.h:52
_button_::last_mouse_x
int last_mouse_x
Definition
button.h:55
_button_::h
int h
Definition
button.h:54
_button_::title
char * title
Definition
button.h:61
_button_::focused
bool focused
Definition
button.h:64
_button_::hover_painted
bool hover_painted
Definition
button.h:59
_button_::clicked
bool clicked
Definition
button.h:57
_button_::kill_focus
bool kill_focus
Definition
button.h:60
_button_::mouseEvent
void(* mouseEvent)(_button_ *button, ChWindow *win, int x, int y, int but)
Definition
button.h:67
_button_::x
int x
Definition
button.h:51
_button_::hover
bool hover
Definition
button.h:58
_chwin_
Definition
window.h:90
Generated by
1.9.8