Merge pull request #6 from mcha-forks/master
gtklock: update to major version 4
This commit is contained in:
commit
f1557ae5a9
2 changed files with 13 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
// gtklock-powerbar-module
|
// gtklock-playerctl-module
|
||||||
// Copyright (c) 2024 Jovan Lanik
|
// Copyright (c) 2024 Jovan Lanik
|
||||||
|
|
||||||
// Module header
|
// Module header
|
||||||
|
@ -15,11 +15,14 @@ struct Window {
|
||||||
GtkWidget *body_grid;
|
GtkWidget *body_grid;
|
||||||
GtkWidget *input_label;
|
GtkWidget *input_label;
|
||||||
GtkWidget *input_field;
|
GtkWidget *input_field;
|
||||||
|
GtkWidget *message_revealer;
|
||||||
|
GtkWidget *message_scrolled_window;
|
||||||
GtkWidget *message_box;
|
GtkWidget *message_box;
|
||||||
GtkWidget *unlock_button;
|
GtkWidget *unlock_button;
|
||||||
GtkWidget *error_label;
|
GtkWidget *error_label;
|
||||||
GtkWidget *warning_label;
|
GtkWidget *warning_label;
|
||||||
GtkWidget *clock_label;
|
GtkWidget *clock_label;
|
||||||
|
GtkWidget *date_label;
|
||||||
|
|
||||||
void *module_data[];
|
void *module_data[];
|
||||||
};
|
};
|
||||||
|
@ -27,6 +30,7 @@ struct Window {
|
||||||
struct GtkLock {
|
struct GtkLock {
|
||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
void *lock;
|
void *lock;
|
||||||
|
pid_t parent;
|
||||||
|
|
||||||
GArray *windows;
|
GArray *windows;
|
||||||
GArray *messages;
|
GArray *messages;
|
||||||
|
@ -36,15 +40,20 @@ struct GtkLock {
|
||||||
gboolean hidden;
|
gboolean hidden;
|
||||||
guint idle_timeout;
|
guint idle_timeout;
|
||||||
|
|
||||||
guint draw_clock_source;
|
guint draw_time_source;
|
||||||
guint idle_hide_source;
|
guint idle_hide_source;
|
||||||
|
|
||||||
|
gboolean follow_focus;
|
||||||
gboolean use_idle_hide;
|
gboolean use_idle_hide;
|
||||||
|
|
||||||
char *time;
|
char *time;
|
||||||
|
char *date;
|
||||||
char *time_format;
|
char *time_format;
|
||||||
|
char *date_format;
|
||||||
char *config_path;
|
char *config_path;
|
||||||
char *layout_path;
|
char *layout_path;
|
||||||
|
char *lock_command;
|
||||||
|
char *unlock_command;
|
||||||
|
|
||||||
GArray *modules;
|
GArray *modules;
|
||||||
};
|
};
|
||||||
|
@ -52,6 +61,7 @@ struct GtkLock {
|
||||||
const gchar *g_module_check_init(GModule *m);
|
const gchar *g_module_check_init(GModule *m);
|
||||||
void g_module_unload(GModule *m);
|
void g_module_unload(GModule *m);
|
||||||
void on_activation(struct GtkLock *gtklock, int id);
|
void on_activation(struct GtkLock *gtklock, int id);
|
||||||
|
void on_locked(struct GtkLock *gtklock);
|
||||||
void on_output_change(struct GtkLock *gtklock);
|
void on_output_change(struct GtkLock *gtklock);
|
||||||
void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window *old);
|
void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window *old);
|
||||||
void on_idle_hide(struct GtkLock *gtklock);
|
void on_idle_hide(struct GtkLock *gtklock);
|
||||||
|
|
2
source.c
2
source.c
|
@ -21,7 +21,7 @@ struct powerbar {
|
||||||
};
|
};
|
||||||
|
|
||||||
const gchar module_name[] = "powerbar";
|
const gchar module_name[] = "powerbar";
|
||||||
const guint module_major_version = 3;
|
const guint module_major_version = 4;
|
||||||
const guint module_minor_version = 0;
|
const guint module_minor_version = 0;
|
||||||
|
|
||||||
static int self_id;
|
static int self_id;
|
||||||
|
|
Loading…
Add table
Reference in a new issue