-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbutton.h
More file actions
23 lines (21 loc) · 920 Bytes
/
Copy pathbutton.h
File metadata and controls
23 lines (21 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _BUTTON_H_
#define _BUTTON_H_
#include "widget.h"
typedef struct wwButton wwButton;
typedef void (*wwButtonCallback)(wwButton *button, wwWindowAndRenderer*windowAndRenderer);
struct wwButton
{
wwWidget widget;
};
wwButton* wwButton_Create(wwWindowAndRenderer *windowAndRenderer, wchar_t *name, int x, int y, int width, int height);
void wwButton_SetCallback(wwButton *button, wwButtonCallback callback, void *userData);
void wwButton_SetText(wwButton *button, wchar_t *text);
void wwButton_SetX(wwButton *button, int x);
void wwButton_SetY(wwButton *button, int y);
void wwButton_SetWidth(wwButton *button, int width);
void wwButton_SetHeight(wwButton *button, int height);
void wwButton_SetColor(wwButton *button, wwColor color);
/* returns malloc() pointer, should free() after usage */
wchar_t* wwButton_GetText(wwButton *button);
unsigned short wwButton_GetId(wwButton *button);
#endif /* _BUTTON_H_ */