update for gtklock 2.0.0

This commit is contained in:
Jovan Lanik 2022-10-11 19:29:44 +02:00
parent 33ab29ab25
commit 29afb621cd
3 changed files with 8 additions and 6 deletions

View file

@ -11,6 +11,7 @@ struct Window {
GtkWidget *window; GtkWidget *window;
GtkWidget *overlay; GtkWidget *overlay;
GtkWidget *window_box; GtkWidget *window_box;
GtkWidget *body_revealer;
GtkWidget *body_grid; GtkWidget *body_grid;
GtkWidget *input_label; GtkWidget *input_label;
GtkWidget *input_field; GtkWidget *input_field;
@ -54,8 +55,8 @@ void g_module_unload(GModule *m);
void on_activation(struct GtkLock *gtklock, int id); void on_activation(struct GtkLock *gtklock, int id);
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_window_empty(struct GtkLock *gtklock, struct Window *ctx); void on_window_create(struct GtkLock *gtklock, struct Window *win);
void on_body_empty(struct GtkLock *gtklock, struct Window *ctx); void on_window_destroy(struct GtkLock *gtklock, struct Window *win);
/* /*

View file

@ -5,8 +5,8 @@
NAME := powerbar-module.so NAME := powerbar-module.so
PREFIX ?= /usr/local PREFIX = /usr/local
INSTALL ?= install INSTALL = install
LIBS := gtk+-3.0 gmodule-export-2.0 LIBS := gtk+-3.0 gmodule-export-2.0
CFLAGS += -std=c11 -fPIC $(shell pkg-config --cflags $(LIBS)) CFLAGS += -std=c11 -fPIC $(shell pkg-config --cflags $(LIBS))

View file

@ -18,7 +18,8 @@ struct powerbar {
}; };
const gchar module_name[] = "powerbar"; const gchar module_name[] = "powerbar";
const gchar module_version[] = "v1.3.7"; const guint module_major_version = 2;
const guint module_minor_version = 0;
static int self_id; static int self_id;
@ -95,7 +96,7 @@ void on_focus_change(struct GtkLock *gtklock, struct Window *win, struct Window
gtk_revealer_set_reveal_child(GTK_REVEALER(POWERBAR(old)->revealer), FALSE); gtk_revealer_set_reveal_child(GTK_REVEALER(POWERBAR(old)->revealer), FALSE);
} }
void on_window_empty(struct GtkLock *gtklock, struct Window *ctx) { void on_window_destroy(struct GtkLock *gtklock, struct Window *ctx) {
if(MODULE_DATA(ctx) != NULL) { if(MODULE_DATA(ctx) != NULL) {
g_free(MODULE_DATA(ctx)); g_free(MODULE_DATA(ctx));
MODULE_DATA(ctx) = NULL; MODULE_DATA(ctx) = NULL;