File: window.h

package info (click to toggle)
gtklock 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 328 kB
  • sloc: ansic: 1,195; makefile: 7; xml: 6
file content (43 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// gtklock
// Copyright (c) 2022 Kenny Levinsen, Jovan Lanik, Bhaskar Khoraja

// Window functions

#pragma once

#include <gtk/gtk.h>

struct Window {
	GdkMonitor *monitor;

	GtkWidget *window;
	GtkWidget *overlay;
	GtkWidget *window_box;
	GtkWidget *body_revealer;
	GtkWidget *body_grid;
	GtkWidget *input_label;
	GtkWidget *input_field;
	GtkWidget *message_revealer;
	GtkWidget *message_scrolled_window;
	GtkWidget *message_box;
	GtkWidget *unlock_button;
	GtkWidget *error_label;
	GtkWidget *warning_label;
	GtkWidget *info_box;
	GtkWidget *time_box;
	GtkWidget *clock_label;
	GtkWidget *date_label;

	void *module_data[];
};

struct Window *window_by_widget(GtkWidget *window);
struct Window *window_by_monitor(GdkMonitor *monitor);
struct Window *window_last_active(void);
struct Window *create_window(GdkMonitor *monitor);
void window_idle_hide(struct Window *win);
void window_idle_show(struct Window *win);
void window_update_clock(struct Window *ctx);
void window_update_date(struct Window *ctx);
void window_swap_focus(struct Window *win, struct Window *old);