Demos updated to remove now deprecated function gwinAttachMouse
This commit is contained in:
parent
72d04f891b
commit
e7bc175ca0
10 changed files with 10 additions and 42 deletions
|
@ -39,7 +39,7 @@ static void createWidgets(void) {
|
||||||
gwinWidgetClearInit(&wi);
|
gwinWidgetClearInit(&wi);
|
||||||
wi.g.show = TRUE;
|
wi.g.show = TRUE;
|
||||||
|
|
||||||
// Apply the button parameters
|
// Apply the button parameters
|
||||||
wi.g.width = 100;
|
wi.g.width = 100;
|
||||||
wi.g.height = 30;
|
wi.g.height = 30;
|
||||||
wi.g.y = 10;
|
wi.g.y = 10;
|
||||||
|
@ -67,9 +67,6 @@ int main(void) {
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// create the widget
|
// create the widget
|
||||||
createWidgets();
|
createWidgets();
|
||||||
|
|
||||||
|
|
|
@ -39,14 +39,14 @@ static void createWidgets(void) {
|
||||||
gwinWidgetClearInit(&wi);
|
gwinWidgetClearInit(&wi);
|
||||||
wi.g.show = TRUE;
|
wi.g.show = TRUE;
|
||||||
|
|
||||||
// Apply the checkbox parameters
|
// Apply the checkbox parameters
|
||||||
wi.g.width = 100; // includes text
|
wi.g.width = 100; // includes text
|
||||||
wi.g.height = 20;
|
wi.g.height = 20;
|
||||||
wi.g.y = 10;
|
wi.g.y = 10;
|
||||||
wi.g.x = 10;
|
wi.g.x = 10;
|
||||||
wi.text = "Checkbox";
|
wi.text = "Checkbox";
|
||||||
|
|
||||||
// Create the actual checkbox
|
// Create the actual checkbox
|
||||||
ghCheckbox1 = gwinCheckboxCreate(0, &wi);
|
ghCheckbox1 = gwinCheckboxCreate(0, &wi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,9 +61,6 @@ int main(void) {
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// create the widget
|
// create the widget
|
||||||
createWidgets();
|
createWidgets();
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ static void createWidgets(void) {
|
||||||
ghContainer = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER);
|
ghContainer = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER);
|
||||||
wi.g.show = TRUE;
|
wi.g.show = TRUE;
|
||||||
|
|
||||||
// Apply the button parameters
|
// Apply the button parameters
|
||||||
wi.g.width = 120;
|
wi.g.width = 120;
|
||||||
wi.g.height = 30;
|
wi.g.height = 30;
|
||||||
wi.g.y = 10;
|
wi.g.y = 10;
|
||||||
|
@ -37,9 +37,6 @@ int main(void) {
|
||||||
// Initialize the display
|
// Initialize the display
|
||||||
gfxInit();
|
gfxInit();
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// Set the widget defaults
|
// Set the widget defaults
|
||||||
gwinSetDefaultFont(gdispOpenFont("*"));
|
gwinSetDefaultFont(gdispOpenFont("*"));
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
|
|
|
@ -40,7 +40,7 @@ static void createWidgets(void) {
|
||||||
wi.text = "Container 3";
|
wi.text = "Container 3";
|
||||||
ghContainer3 = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER);
|
ghContainer3 = gwinContainerCreate(0, &wi, GWIN_CONTAINER_BORDER);
|
||||||
|
|
||||||
// Button 1
|
// Button 1
|
||||||
wi.g.width = 80;
|
wi.g.width = 80;
|
||||||
wi.g.height = 20;
|
wi.g.height = 20;
|
||||||
wi.g.y = 10;
|
wi.g.y = 10;
|
||||||
|
@ -49,7 +49,7 @@ static void createWidgets(void) {
|
||||||
wi.g.parent = ghContainer2;
|
wi.g.parent = ghContainer2;
|
||||||
ghButton1 = gwinButtonCreate(0, &wi);
|
ghButton1 = gwinButtonCreate(0, &wi);
|
||||||
|
|
||||||
// Button 2
|
// Button 2
|
||||||
wi.g.width = 80;
|
wi.g.width = 80;
|
||||||
wi.g.height = 20;
|
wi.g.height = 20;
|
||||||
wi.g.y = 40;
|
wi.g.y = 40;
|
||||||
|
@ -58,7 +58,7 @@ static void createWidgets(void) {
|
||||||
wi.g.parent = ghContainer2;
|
wi.g.parent = ghContainer2;
|
||||||
ghButton2 = gwinButtonCreate(0, &wi);
|
ghButton2 = gwinButtonCreate(0, &wi);
|
||||||
|
|
||||||
// Button 3
|
// Button 3
|
||||||
wi.g.width = 80;
|
wi.g.width = 80;
|
||||||
wi.g.height = 20;
|
wi.g.height = 20;
|
||||||
wi.g.y = 10;
|
wi.g.y = 10;
|
||||||
|
@ -67,7 +67,7 @@ static void createWidgets(void) {
|
||||||
wi.g.parent = ghContainer3;
|
wi.g.parent = ghContainer3;
|
||||||
ghButton3 = gwinButtonCreate(0, &wi);
|
ghButton3 = gwinButtonCreate(0, &wi);
|
||||||
|
|
||||||
// Button 4
|
// Button 4
|
||||||
wi.g.width = 80;
|
wi.g.width = 80;
|
||||||
wi.g.height = 20;
|
wi.g.height = 20;
|
||||||
wi.g.y = 40;
|
wi.g.y = 40;
|
||||||
|
@ -115,9 +115,6 @@ int main(void) {
|
||||||
// Initialize the display
|
// Initialize the display
|
||||||
gfxInit();
|
gfxInit();
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// Set the widget defaults
|
// Set the widget defaults
|
||||||
gwinSetDefaultFont(gdispOpenFont("*"));
|
gwinSetDefaultFont(gdispOpenFont("*"));
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
|
|
|
@ -33,7 +33,7 @@ static void _createWidgets(void) {
|
||||||
wi.text = "Surprise!";
|
wi.text = "Surprise!";
|
||||||
gwinLabelCreate(0, &wi);
|
gwinLabelCreate(0, &wi);
|
||||||
|
|
||||||
// Apply the frame parameters
|
// Apply the frame parameters
|
||||||
wi.g.width = 300;
|
wi.g.width = 300;
|
||||||
wi.g.height = 200;
|
wi.g.height = 200;
|
||||||
wi.g.y = 10;
|
wi.g.y = 10;
|
||||||
|
@ -107,7 +107,7 @@ static void _createWidgets(void) {
|
||||||
wi.g.x = 10;
|
wi.g.x = 10;
|
||||||
wi.g.y = 90;
|
wi.g.y = 90;
|
||||||
ghWindow1 = gwinWindowCreate(0, &wi.g);
|
ghWindow1 = gwinWindowCreate(0, &wi.g);
|
||||||
|
|
||||||
_updateColor();
|
_updateColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,9 +117,6 @@ int main(void) {
|
||||||
// Initialize the display
|
// Initialize the display
|
||||||
gfxInit();
|
gfxInit();
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// Set the widget defaults
|
// Set the widget defaults
|
||||||
gwinSetDefaultFont(gdispOpenFont("*"));
|
gwinSetDefaultFont(gdispOpenFont("*"));
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
|
|
|
@ -63,9 +63,6 @@ int main(void) {
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// create the widget
|
// create the widget
|
||||||
createWidgets();
|
createWidgets();
|
||||||
|
|
||||||
|
|
|
@ -79,9 +79,6 @@ int main(void) {
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// create the widget
|
// create the widget
|
||||||
createWidgets();
|
createWidgets();
|
||||||
|
|
||||||
|
|
|
@ -83,9 +83,6 @@ int main(void) {
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// create the widget
|
// create the widget
|
||||||
createWidgets();
|
createWidgets();
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,6 @@ int main(void) {
|
||||||
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE);
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
|
|
||||||
// Attach the mouse input
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
|
|
||||||
// create the widget
|
// create the widget
|
||||||
createWidgets();
|
createWidgets();
|
||||||
|
|
||||||
|
|
|
@ -418,11 +418,6 @@ int main(void) {
|
||||||
// Initialize the display
|
// Initialize the display
|
||||||
gfxInit();
|
gfxInit();
|
||||||
|
|
||||||
// Connect the mouse
|
|
||||||
#if GINPUT_NEED_MOUSE
|
|
||||||
gwinAttachMouse(0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set the widget defaults
|
// Set the widget defaults
|
||||||
font = gdispOpenFont("*"); // Get the first defined font.
|
font = gdispOpenFont("*"); // Get the first defined font.
|
||||||
gwinSetDefaultFont(font);
|
gwinSetDefaultFont(font);
|
||||||
|
|
Loading…
Add table
Reference in a new issue