tmp
doxygen.sVK7XF
imageButton.h
Go to the documentation of this file.
1
/* --COPYRIGHT--,BSD
2
* Copyright (c) 2016, Texas Instruments Incorporated
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
*
9
* * Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
*
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
*
16
* * Neither the name of Texas Instruments Incorporated nor the names of
17
* its contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
* --/COPYRIGHT--*/
32
33
#ifndef IMAGEBUTTON_H_
34
#define IMAGEBUTTON_H_
35
36
//*****************************************************************************
37
//
39
//
40
//*****************************************************************************
41
typedef
struct
Graphics_ImageButton
42
{
43
uint16_t
xPosition
;
44
uint16_t
yPosition
;
45
uint8_t
borderWidth
;
46
bool
selected
;
47
uint16_t
imageHeight
;
48
uint16_t
imageWidth
;
49
uint32_t
borderColor
;
50
uint32_t
selectedColor
;
51
Graphics_Image
*
image
;
52
}
Graphics_ImageButton
;
53
54
//*****************************************************************************
55
//globals
56
//*****************************************************************************
57
extern
Graphics_Context
g_sContext
;
58
59
//*****************************************************************************
60
// the function prototypes
61
//*****************************************************************************
62
extern
void
Graphics_drawImageButton
(
const
Graphics_Context
*context,
63
const
Graphics_ImageButton
*imageButton);
64
extern
bool
Graphics_isImageButtonSelected
(
65
const
Graphics_ImageButton
*imageButton,
66
uint16_t x,
67
uint16_t y);
68
extern
void
Graphics_drawSelectedImageButton
(
const
Graphics_Context
*context,
69
const
Graphics_ImageButton
*
70
imageButton);
71
extern
void
Graphics_drawReleasedImageButton
(
const
Graphics_Context
*context,
72
const
Graphics_ImageButton
*
73
imageButton);
74
75
#endif
/* IMAGEBUTTON_H_ */
Graphics_Context
Definition:
grlib.h:230
Graphics_ImageButton::imageHeight
uint16_t imageHeight
Definition:
imageButton.h:47
Graphics_Image
This structure defines the characteristics of a Bitmap Image.
Definition:
grlib.h:77
Graphics_ImageButton::selectedColor
uint32_t selectedColor
Definition:
imageButton.h:50
g_sContext
Graphics_Context g_sContext
Graphics_ImageButton
This structure defines the characteristics of a ImageButton.
Definition:
imageButton.h:41
Graphics_ImageButton::xPosition
uint16_t xPosition
Definition:
imageButton.h:43
Graphics_ImageButton::image
Graphics_Image * image
Definition:
imageButton.h:51
Graphics_ImageButton::borderColor
uint32_t borderColor
Definition:
imageButton.h:49
Graphics_ImageButton::borderWidth
uint8_t borderWidth
Definition:
imageButton.h:45
Graphics_isImageButtonSelected
bool Graphics_isImageButtonSelected(const Graphics_ImageButton *imageButton, uint16_t x, uint16_t y)
Definition:
imageButton.c:106
Graphics_ImageButton
struct Graphics_ImageButton Graphics_ImageButton
This structure defines the characteristics of a ImageButton.
Graphics_drawImageButton
void Graphics_drawImageButton(const Graphics_Context *context, const Graphics_ImageButton *imageButton)
Definition:
imageButton.c:58
Graphics_drawReleasedImageButton
void Graphics_drawReleasedImageButton(const Graphics_Context *context, const Graphics_ImageButton *imageButton)
Definition:
imageButton.c:173
Graphics_ImageButton::selected
bool selected
Definition:
imageButton.h:46
Graphics_drawSelectedImageButton
void Graphics_drawSelectedImageButton(const Graphics_Context *context, const Graphics_ImageButton *imageButton)
Definition:
imageButton.c:133
Graphics_ImageButton::yPosition
uint16_t yPosition
Definition:
imageButton.h:44
Graphics_ImageButton::imageWidth
uint16_t imageWidth
Definition:
imageButton.h:48
Copyright 2018, Texas Instruments Incorporated