mirror of
https://github.com/labwc/labwc.git
synced 2026-03-19 05:33:53 -04:00
common: move MIN and MAX to common/macros.h
This commit is contained in:
parent
5cb1d0e83f
commit
048d22d473
5 changed files with 21 additions and 8 deletions
|
|
@ -32,4 +32,22 @@
|
||||||
(dest)->name.notify = handle_##name; \
|
(dest)->name.notify = handle_##name; \
|
||||||
wl_signal_add(&(src)->events.name, &(dest)->name)
|
wl_signal_add(&(src)->events.name, &(dest)->name)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MIN() - Minimum of two values.
|
||||||
|
*
|
||||||
|
* @note Arguments may be evaluated twice.
|
||||||
|
*/
|
||||||
|
#ifndef MIN
|
||||||
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MAX() - Maximum of two values.
|
||||||
|
*
|
||||||
|
* @note Arguments may be evaluated twice.
|
||||||
|
*/
|
||||||
|
#ifndef MAX
|
||||||
|
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* LABWC_MACROS_H */
|
#endif /* LABWC_MACROS_H */
|
||||||
|
|
|
||||||
|
|
@ -57,14 +57,6 @@
|
||||||
#define XCURSOR_DEFAULT "left_ptr"
|
#define XCURSOR_DEFAULT "left_ptr"
|
||||||
#define XCURSOR_SIZE 24
|
#define XCURSOR_SIZE 24
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum input_mode {
|
enum input_mode {
|
||||||
LAB_INPUT_STATE_PASSTHROUGH = 0,
|
LAB_INPUT_STATE_PASSTHROUGH = 0,
|
||||||
LAB_INPUT_STATE_MOVE,
|
LAB_INPUT_STATE_MOVE,
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
#include "common/list.h"
|
#include "common/list.h"
|
||||||
|
#include "common/macros.h"
|
||||||
#include "common/mem.h"
|
#include "common/mem.h"
|
||||||
#include "common/nodename.h"
|
#include "common/nodename.h"
|
||||||
#include "common/parse-bool.h"
|
#include "common/parse-bool.h"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#include <wlr/types/wlr_scene.h>
|
#include <wlr/types/wlr_scene.h>
|
||||||
#include <wlr/util/box.h>
|
#include <wlr/util/box.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
|
#include "common/macros.h"
|
||||||
#include "common/scaled_font_buffer.h"
|
#include "common/scaled_font_buffer.h"
|
||||||
#include "labwc.h"
|
#include "labwc.h"
|
||||||
#include "resize_indicator.h"
|
#include "resize_indicator.h"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
#include "common/macros.h"
|
||||||
#include "common/match.h"
|
#include "common/match.h"
|
||||||
#include "common/mem.h"
|
#include "common/mem.h"
|
||||||
#include "common/scene-helpers.h"
|
#include "common/scene-helpers.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue