//-------------
// Constructor \
//---------------------------------------------------------------------------
C_TOOLBAR_TOP::C_TOOLBAR_TOP( C_WINDOW *pxcParentObj, C_STATUS *pxcStatus )
								: C_TOOLBAR( pxcParentObj, D_TOP_TBAR, 40 )
{
	DECLARE_BUTTON_TABLE( xtButtons )
		DECLARE_BUTTON( DB_OPEN, DB_OPEN_UP, DB_OPEN_DN, 0,
							"Open a file", 8, 4 )
		DECLARE_BUTTON( DB_SAVE, DB_SAVE_UP, DB_SAVE_DN, 0,
							"Save a file", 40, 4 )
		DECLARE_BUTTON( DB_CUT, DB_CUT_UP, DB_CUT_DN, 0,
							"Cut selected text", 80, 4 )
		DECLARE_BUTTON( DB_COPY, DB_COPY_UP, DB_COPY_DN, 0,
							"Copy selected text", 112, 4 )
		DECLARE_BUTTON( DB_PASTE, DB_PASTE_UP, DB_PASTE_DN, 0,
							"Paste text from the clipboard", 144, 4 )
		DECLARE_BUTTON( DB_FIND, DB_FIND_UP, DB_FIND_DN, 0,
						"Display the text search/replace dialog", 184, 4 )
	END_BUTTON_TABLE


	// Set the status bar object used by the toolbar
	Status( pxcStatus );

	// Add some toolbar buttons
	CreateButtons( xtButtons );
}
//-------------
// Constructor \
//---------------------------------------------------------------------------
C_TOOLBAR_TOP::C_TOOLBAR_TOP( C_WINDOW *pxcParentObj, C_STATUS *pxcStatus )
								: C_TOOLBAR( pxcParentObj, D_TOP_TBAR, 40 )
{
	DECLARE_BUTTON_TABLE( xtButtons )
		DECLARE_BUTTON( DB_CONFIG, DB_CONFIG_UP, DB_CONFIG_DN, 0,
							"Configure the program", 8, 4 )
	END_BUTTON_TABLE


	// Set the status bar object used by the toolbar
	Status( pxcStatus );

	// Add some toolbar buttons
	CreateButtons( xtButtons );
}
Beispiel #3
0
		I2C_BOARD_INFO("uda1380", 0x1a),
		.platform_data = &uda1380_info,
	},
};

#define DECLARE_BUTTON(p, k, n, w)	\
	{				\
		.gpio		= p,	\
		.code		= k,	\
		.desc		= n,	\
		.wakeup		= w,	\
		.active_low	= 1,	\
	}

static struct gpio_keys_button h1940_buttons[] = {
	DECLARE_BUTTON(S3C2410_GPF(0),       KEY_POWER,          "Power", 1),
	DECLARE_BUTTON(S3C2410_GPF(6),       KEY_ENTER,         "Select", 1),
	DECLARE_BUTTON(S3C2410_GPF(7),      KEY_RECORD,         "Record", 0),
	DECLARE_BUTTON(S3C2410_GPG(0),         KEY_F11,       "Calendar", 0),
	DECLARE_BUTTON(S3C2410_GPG(2),         KEY_F12,       "Contacts", 0),
	DECLARE_BUTTON(S3C2410_GPG(3),        KEY_MAIL,           "Mail", 0),
	DECLARE_BUTTON(S3C2410_GPG(6),        KEY_LEFT,     "Left_arrow", 0),
	DECLARE_BUTTON(S3C2410_GPG(7),    KEY_HOMEPAGE,           "Home", 0),
	DECLARE_BUTTON(S3C2410_GPG(8),       KEY_RIGHT,    "Right_arrow", 0),
	DECLARE_BUTTON(S3C2410_GPG(9),          KEY_UP,       "Up_arrow", 0),
	DECLARE_BUTTON(S3C2410_GPG(10),       KEY_DOWN,     "Down_arrow", 0),
};

static struct gpio_keys_platform_data h1940_buttons_data = {
	.buttons	= h1940_buttons,
	.nbuttons	= ARRAY_SIZE(h1940_buttons),
Beispiel #4
0
#define SERVAPP_NUM_ATTR_SUPPORTED	1 + (21 * 3)

/**
 * Profile Attributes - Table
 */
static gattAttribute_t buttonsProfileAttributesTable[SERVAPP_NUM_ATTR_SUPPORTED] =
{
	// Simple Profile Service
	{
		{ ATT_BT_UUID_SIZE, primaryServiceUUID },	/* type */
		GATT_PERMIT_READ,							/* permissions */
		0,											/* handle */
		(uint8*)&buttonsProfileService				/* pValue */
	},

	DECLARE_BUTTON(aProperties, aUUID, aVal, aDescription),
	DECLARE_BUTTON(bProperties, bUUID, bVal, bDescription),
	DECLARE_BUTTON(xProperties, xUUID, xVal, xDescription),
	DECLARE_BUTTON(yProperties, yUUID, yVal, yDescription),

	DECLARE_BUTTON(upProperties, upUUID, upVal, upDescription),
	DECLARE_BUTTON(dnProperties, dnUUID, dnVal, dnDescription),
	DECLARE_BUTTON(lProperties, lUUID, lVal, lDescription),
	DECLARE_BUTTON(rProperties, rUUID, rVal, rDescription),

	DECLARE_BUTTON(lbProperties, lbUUID, lbVal, lbDescription),
	DECLARE_BUTTON(rbProperties, rbUUID, rbVal, rbDescription),

	DECLARE_BUTTON(lsProperties, lsUUID, lsVal, lsDescription),
	DECLARE_BUTTON(rsProperties, rsUUID, rsVal, rsDescription),