2009-04-26 10:46:09 +02:00
|
|
|
/*
|
|
|
|
* button.h - button header
|
|
|
|
*
|
|
|
|
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AWESOME_BUTTON_H
|
|
|
|
#define AWESOME_BUTTON_H
|
|
|
|
|
|
|
|
#include "structs.h"
|
|
|
|
|
|
|
|
/** Mouse buttons bindings */
|
|
|
|
struct button_t
|
|
|
|
{
|
2009-06-16 16:24:58 +02:00
|
|
|
LUA_OBJECT_HEADER
|
2009-04-26 10:46:09 +02:00
|
|
|
/** Key modifiers */
|
2009-04-26 13:01:37 +02:00
|
|
|
uint16_t mod;
|
2009-04-26 10:46:09 +02:00
|
|
|
/** Mouse button number */
|
2009-04-26 12:34:13 +02:00
|
|
|
xcb_button_t button;
|
2009-04-26 10:46:09 +02:00
|
|
|
/** Lua function to execute on press. */
|
2009-07-28 10:29:30 +02:00
|
|
|
void *press;
|
2009-04-26 10:46:09 +02:00
|
|
|
/** Lua function to execute on release. */
|
2009-07-28 10:29:30 +02:00
|
|
|
void *release;
|
2009-04-26 10:46:09 +02:00
|
|
|
};
|
|
|
|
|
2009-07-28 10:29:30 +02:00
|
|
|
ARRAY_FUNCS(button_t *, button, DO_NOTHING)
|
|
|
|
LUA_OBJECT_FUNCS(button_t, button, "button")
|
2009-04-26 10:46:09 +02:00
|
|
|
|
2009-07-28 10:29:30 +02:00
|
|
|
int luaA_button_array_get(lua_State *, int, button_array_t *);
|
|
|
|
void luaA_button_array_set(lua_State *, int, int, button_array_t *);
|
2009-04-26 10:46:09 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|