opt: change unsigned int to uint32_t

This commit is contained in:
DreamMaoMao 2025-12-02 16:57:24 +08:00
parent 9196e2a50b
commit b9952f03b5
20 changed files with 314 additions and 329 deletions

View file

@ -52,7 +52,7 @@ typedef struct {
typedef struct {
const char *id;
const char *title;
unsigned int tags;
uint32_t tags;
int isfloating;
int isfullscreen;
float scroller_proportion;
@ -124,29 +124,29 @@ KeyBinding default_key_bindings[] = {CHVT(1), CHVT(2), CHVT(3), CHVT(4),
CHVT(9), CHVT(10), CHVT(11), CHVT(12)};
typedef struct {
unsigned int mod;
unsigned int button;
uint32_t mod;
uint32_t button;
int (*func)(const Arg *);
Arg arg;
} MouseBinding;
typedef struct {
unsigned int mod;
unsigned int dir;
uint32_t mod;
uint32_t dir;
int (*func)(const Arg *);
Arg arg;
} AxisBinding;
typedef struct {
unsigned int fold;
uint32_t fold;
int (*func)(const Arg *);
Arg arg;
} SwitchBinding;
typedef struct {
unsigned int mod;
unsigned int motion;
unsigned int fingers_count;
uint32_t mod;
uint32_t motion;
uint32_t fingers_count;
int (*func)(const Arg *);
Arg arg;
} GestureBinding;
@ -210,7 +210,7 @@ typedef struct {
int snap_distance;
int enable_floating_snap;
int drag_tile_to_tile;
unsigned int swipe_min_threshold;
uint32_t swipe_min_threshold;
float focused_opacity;
float unfocused_opacity;
float *scroller_proportion_preset;
@ -219,21 +219,21 @@ typedef struct {
char **circle_layout;
int circle_layout_count;
unsigned int new_is_master;
uint32_t new_is_master;
float default_mfact;
unsigned int default_nmaster;
uint32_t default_nmaster;
int center_master_overspread;
int center_when_single_stack;
unsigned int hotarea_size;
unsigned int enable_hotarea;
unsigned int ov_tab_mode;
uint32_t hotarea_size;
uint32_t enable_hotarea;
uint32_t ov_tab_mode;
int overviewgappi;
int overviewgappo;
unsigned int cursor_hide_timeout;
uint32_t cursor_hide_timeout;
unsigned int axis_bind_apply_timeout;
unsigned int focus_on_activate;
uint32_t axis_bind_apply_timeout;
uint32_t focus_on_activate;
int inhibit_regardless_of_visibility;
int sloppyfocus;
int warpcursor;
@ -241,7 +241,7 @@ typedef struct {
/* keyboard */
int repeat_rate;
int repeat_delay;
unsigned int numlockon;
uint32_t numlockon;
/* Trackpad */
int disable_trackpad;
@ -253,13 +253,13 @@ typedef struct {
int disable_while_typing;
int left_handed;
int middle_button_emulation;
unsigned int accel_profile;
uint32_t accel_profile;
double accel_speed;
unsigned int scroll_method;
unsigned int scroll_button;
unsigned int click_method;
unsigned int send_events_mode;
unsigned int button_map;
uint32_t scroll_method;
uint32_t scroll_button;
uint32_t click_method;
uint32_t send_events_mode;
uint32_t button_map;
int blur;
int blur_layer;
@ -269,18 +269,18 @@ typedef struct {
int shadows;
int shadow_only_floating;
int layer_shadows;
unsigned int shadows_size;
uint32_t shadows_size;
float shadows_blur;
int shadows_position_x;
int shadows_position_y;
float shadowscolor[4];
int smartgaps;
unsigned int gappih;
unsigned int gappiv;
unsigned int gappoh;
unsigned int gappov;
unsigned int borderpx;
uint32_t gappih;
uint32_t gappiv;
uint32_t gappoh;
uint32_t gappov;
uint32_t borderpx;
float scratchpad_width_ratio;
float scratchpad_height_ratio;
float rootcolor[4];
@ -331,7 +331,7 @@ typedef struct {
int exec_once_count;
char *cursor_theme;
unsigned int cursor_size;
uint32_t cursor_size;
int single_scratchpad;
int xwayland_persistence;
@ -789,7 +789,7 @@ void convert_hex_to_rgba(float *color, unsigned long int hex) {
color[3] = (hex & 0xFF) / 255.0f;
}
unsigned int parse_num_type(char *str) {
uint32_t parse_num_type(char *str) {
switch (str[0]) {
case '-':
return NUM_TYPE_MINUS;

View file

@ -33,27 +33,27 @@ double animation_curve_close[4] = {0.46, 1.0, 0.29, 0.99}; // 动画曲线
double animation_curve_focus[4] = {0.46, 1.0, 0.29, 0.99}; // 动画曲线
/* appearance */
unsigned int axis_bind_apply_timeout = 100; // 滚轮绑定动作的触发的时间间隔
unsigned int focus_on_activate = 1; // 收到窗口激活请求是否自动跳转聚焦
unsigned int new_is_master = 1; // 新窗口是否插在头部
double default_mfact = 0.55f; // master 窗口比例
unsigned int default_nmaster = 1; // 默认master数量
int center_master_overspread = 0; // 中心master时是否铺满
int center_when_single_stack = 1; // 单个stack时是否居中
uint32_t axis_bind_apply_timeout = 100; // 滚轮绑定动作的触发的时间间隔
uint32_t focus_on_activate = 1; // 收到窗口激活请求是否自动跳转聚焦
uint32_t new_is_master = 1; // 新窗口是否插在头部
double default_mfact = 0.55f; // master 窗口比例
uint32_t default_nmaster = 1; // 默认master数量
int center_master_overspread = 0; // 中心master时是否铺满
int center_when_single_stack = 1; // 单个stack时是否居中
/* logging */
int log_level = WLR_ERROR;
unsigned int numlockon = 0; // 是否打开右边小键盘
unsigned int capslock = 0; // 是否启用快捷键
uint32_t numlockon = 0; // 是否打开右边小键盘
uint32_t capslock = 0; // 是否启用快捷键
unsigned int ov_tab_mode = 0; // alt tab切换模式
unsigned int hotarea_size = 10; // 热区大小,10x10
unsigned int enable_hotarea = 1; // 是否启用鼠标热区
int smartgaps = 0; /* 1 means no outer gap when there is only one window */
int sloppyfocus = 1; /* focus follows mouse */
unsigned int gappih = 5; /* horiz inner gap between windows */
unsigned int gappiv = 5; /* vert inner gap between windows */
unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
unsigned int gappov = 10; /* vert outer gap between windows and screen edge */
uint32_t ov_tab_mode = 0; // alt tab切换模式
uint32_t hotarea_size = 10; // 热区大小,10x10
uint32_t enable_hotarea = 1; // 是否启用鼠标热区
int smartgaps = 0; /* 1 means no outer gap when there is only one window */
int sloppyfocus = 1; /* focus follows mouse */
uint32_t gappih = 5; /* horiz inner gap between windows */
uint32_t gappiv = 5; /* vert inner gap between windows */
uint32_t gappoh = 10; /* horiz outer gap between windows and screen edge */
uint32_t gappov = 10; /* vert outer gap between windows and screen edge */
float scratchpad_width_ratio = 0.8;
float scratchpad_height_ratio = 0.9;
@ -73,15 +73,15 @@ int no_radius_when_single = 0;
int snap_distance = 30;
int enable_floating_snap = 0;
int drag_tile_to_tile = 0;
unsigned int cursor_size = 24;
unsigned int cursor_hide_timeout = 0;
uint32_t cursor_size = 24;
uint32_t cursor_hide_timeout = 0;
unsigned int swipe_min_threshold = 1;
uint32_t swipe_min_threshold = 1;
int inhibit_regardless_of_visibility =
0; /* 1 means idle inhibitors will disable idle tracking even if it's
surface isn't visible */
unsigned int borderpx = 4; /* border pixel of windows */
uint32_t borderpx = 4; /* border pixel of windows */
float rootcolor[] = COLOR(0x323232ff);
float bordercolor[] = COLOR(0x444444ff);
float focuscolor[] = COLOR(0xc66b25ff);
@ -166,7 +166,7 @@ LIBINPUT_CONFIG_SCROLL_EDGE
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
*/
enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
unsigned int scroll_button = 274;
uint32_t scroll_button = 274;
/* You can choose between:
LIBINPUT_CONFIG_CLICK_METHOD_NONE
@ -224,7 +224,7 @@ float blur_params_saturation = 1.2;
int shadows = 0;
int shadow_only_floating = 1;
int layer_shadows = 0;
unsigned int shadows_size = 10;
uint32_t shadows_size = 10;
double shadows_blur = 15;
int shadows_position_x = 0;
int shadows_position_y = 0;