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
|
|
|
|
|
2009-09-07 17:22:32 +02:00
|
|
|
#include "globalconf.h"
|
2009-04-26 10:46:09 +02:00
|
|
|
|
|
|
|
/** 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-08-17 14:10:03 +02:00
|
|
|
uint16_t modifiers;
|
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
|
|
|
};
|
|
|
|
|
2009-06-09 12:51:25 +02:00
|
|
|
lua_class_t button_class;
|
2009-08-17 15:52:41 +02:00
|
|
|
LUA_OBJECT_FUNCS(button_class, button_t, button)
|
2009-08-14 16:46:35 +02:00
|
|
|
ARRAY_FUNCS(button_t *, button, DO_NOTHING)
|
|
|
|
|
|
|
|
int luaA_button_array_get(lua_State *, int, button_array_t *);
|
|
|
|
void luaA_button_array_set(lua_State *, int, int, button_array_t *);
|
2009-08-17 14:10:03 +02:00
|
|
|
void button_class_setup(lua_State *);
|
2009-04-26 10:46:09 +02:00
|
|
|
|
|
|
|
#endif
|
2009-08-17 14:10:03 +02:00
|
|
|
|
2012-03-25 17:41:12 +02:00
|
|
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|