proto_types.h (2426B)
1 /* 2 * Copyright (c) 2022-2024 lumidify <nobody@lumidify.org> 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #ifndef LTKD_PROTO_TYPES_H 18 #define LTKD_PROTO_TYPES_H 19 20 /* P == protocol; W == widget */ 21 22 #define LTKD_PEVENT_MOUSEPRESS 0 23 #define LTKD_PEVENT_MOUSERELEASE 1 24 #define LTKD_PEVENT_MOUSEMOTION 2 25 #define LTKD_PEVENT_MOUSESCROLL 3 26 #define LTKD_PEVENT_KEYPRESS 4 27 #define LTKD_PEVENT_KEYRELEASE 5 28 #define LTKD_PEVENT_RESIZE 6 29 #define LTKD_PEVENT_STATECHANGE 7 30 31 /* FIXME: standardize names - internally, buttonpress is used, here it's mousepress... */ 32 #define LTKD_PEVENTMASK_NONE (UINT32_C(0)) 33 #define LTKD_PEVENTMASK_MOUSEPRESS (UINT32_C(1) << LTKD_PEVENT_MOUSEPRESS) 34 #define LTKD_PEVENTMASK_MOUSERELEASE (UINT32_C(1) << LTKD_PEVENT_MOUSERELEASE) 35 #define LTKD_PEVENTMASK_MOUSEMOTION (UINT32_C(1) << LTKD_PEVENT_MOUSEMOTION) 36 #define LTKD_PEVENTMASK_KEYPRESS (UINT32_C(1) << LTKD_PEVENT_KEYPRESS) 37 #define LTKD_PEVENTMASK_KEYRELEASE (UINT32_C(1) << LTKD_PEVENT_KEYRELEASE) 38 #define LTKD_PEVENTMASK_RESIZE (UINT32_C(1) << LTKD_PEVENT_RESIZE) 39 #define LTKD_PEVENTMASK_EXPOSE (UINT32_C(1) << LTKD_PEVENT_EXPOSE) 40 #define LTKD_PEVENTMASK_STATECHANGE (UINT32_C(1) << LTKD_PEVENT_STATECHANGE) 41 #define LTKD_PEVENTMASK_MOUSESCROLL (UINT32_C(1) << LTKD_PEVENT_MOUSESCROLL) 42 43 #define LTKD_PWEVENT_MENUENTRY_PRESS 0 44 #define LTKD_PWEVENTMASK_MENUENTRY_NONE (UINT32_C(0)) 45 #define LTKD_PWEVENTMASK_MENUENTRY_PRESS (UINT32_C(1) << LTKD_PWEVENT_MENUENTRY_PRESS) 46 47 #define LTKD_PWEVENT_BUTTON_PRESS 0 48 #define LTKD_PWEVENTMASK_BUTTON_NONE (UINT32_C(0)) 49 #define LTKD_PWEVENTMASK_BUTTON_PRESS (UINT32_C(1) << LTKD_PWEVENT_BUTTON_PRESS) 50 51 #endif /* LTKD_PROTO_TYPES_H */