99 lines
5.1 KiB
Rust
99 lines
5.1 KiB
Rust
// This file was generated by gir (89daf8f) from gir-files (1f01de0)
|
|
// DO NOT EDIT
|
|
|
|
#![allow(non_camel_case_types, non_upper_case_globals)]
|
|
|
|
extern crate libc;
|
|
#[macro_use] extern crate bitflags;
|
|
extern crate glib_sys as glib;
|
|
extern crate gobject_sys as gobject;
|
|
extern crate gdk_pixbuf_sys as gdk_pixbuf;
|
|
|
|
#[allow(unused_imports)]
|
|
use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
|
|
c_short, c_ushort, c_long, c_ulong,
|
|
c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE};
|
|
|
|
#[allow(unused_imports)]
|
|
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};
|
|
|
|
// Enums
|
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
#[repr(C)]
|
|
pub enum NotifyUrgency {
|
|
Low = 0,
|
|
Normal = 1,
|
|
Critical = 2,
|
|
}
|
|
pub const NOTIFY_URGENCY_LOW: NotifyUrgency = NotifyUrgency::Low;
|
|
pub const NOTIFY_URGENCY_NORMAL: NotifyUrgency = NotifyUrgency::Normal;
|
|
pub const NOTIFY_URGENCY_CRITICAL: NotifyUrgency = NotifyUrgency::Critical;
|
|
|
|
// Constants
|
|
pub const NOTIFY_EXPIRES_DEFAULT: c_int = -1;
|
|
pub const NOTIFY_EXPIRES_NEVER: c_int = 0;
|
|
pub const NOTIFY_VERSION_MAJOR: c_int = 0;
|
|
pub const NOTIFY_VERSION_MICRO: c_int = 7;
|
|
pub const NOTIFY_VERSION_MINOR: c_int = 7;
|
|
|
|
// Callbacks
|
|
pub type NotifyActionCallback = Option<unsafe extern "C" fn(*mut NotifyNotification, *mut c_char, gpointer)>;
|
|
|
|
// Records
|
|
#[repr(C)]
|
|
pub struct NotifyNotificationClass {
|
|
pub parent_class: gobject::GObjectClass,
|
|
pub closed: Option<unsafe extern "C" fn(*mut NotifyNotification)>,
|
|
}
|
|
|
|
#[repr(C)]
|
|
pub struct NotifyNotificationPrivate(c_void);
|
|
|
|
// Classes
|
|
#[repr(C)]
|
|
pub struct NotifyNotification {
|
|
pub parent_object: gobject::GObject,
|
|
pub priv_: *mut NotifyNotificationPrivate,
|
|
}
|
|
|
|
extern "C" {
|
|
|
|
//=========================================================================
|
|
// NotifyNotification
|
|
//=========================================================================
|
|
pub fn notify_notification_get_type() -> GType;
|
|
pub fn notify_notification_new(summary: *const c_char, body: *const c_char, icon: *const c_char) -> *mut NotifyNotification;
|
|
//pub fn notify_notification_add_action(notification: *mut NotifyNotification, action: *const c_char, label: *const c_char, callback: NotifyActionCallback, user_data: gpointer, free_func: /*Metadata mismatch*/[c:type mismatch `GFreeFunc` != `GDestroyNotify` of `DestroyNotify`]);
|
|
pub fn notify_notification_clear_actions(notification: *mut NotifyNotification);
|
|
pub fn notify_notification_clear_hints(notification: *mut NotifyNotification);
|
|
pub fn notify_notification_close(notification: *mut NotifyNotification, error: *mut *mut glib::GError) -> gboolean;
|
|
pub fn notify_notification_get_closed_reason(notification: *const NotifyNotification) -> c_int;
|
|
pub fn notify_notification_set_app_name(notification: *mut NotifyNotification, app_name: *const c_char);
|
|
pub fn notify_notification_set_category(notification: *mut NotifyNotification, category: *const c_char);
|
|
pub fn notify_notification_set_hint(notification: *mut NotifyNotification, key: *const c_char, value: *mut glib::GVariant);
|
|
pub fn notify_notification_set_hint_byte(notification: *mut NotifyNotification, key: *const c_char, value: c_uchar);
|
|
pub fn notify_notification_set_hint_byte_array(notification: *mut NotifyNotification, key: *const c_char, value: *mut u8, len: size_t);
|
|
pub fn notify_notification_set_hint_double(notification: *mut NotifyNotification, key: *const c_char, value: c_double);
|
|
pub fn notify_notification_set_hint_int32(notification: *mut NotifyNotification, key: *const c_char, value: c_int);
|
|
pub fn notify_notification_set_hint_string(notification: *mut NotifyNotification, key: *const c_char, value: *const c_char);
|
|
pub fn notify_notification_set_hint_uint32(notification: *mut NotifyNotification, key: *const c_char, value: c_uint);
|
|
pub fn notify_notification_set_icon_from_pixbuf(notification: *mut NotifyNotification, icon: *mut gdk_pixbuf::GdkPixbuf);
|
|
pub fn notify_notification_set_image_from_pixbuf(notification: *mut NotifyNotification, pixbuf: *mut gdk_pixbuf::GdkPixbuf);
|
|
pub fn notify_notification_set_timeout(notification: *mut NotifyNotification, timeout: c_int);
|
|
pub fn notify_notification_set_urgency(notification: *mut NotifyNotification, urgency: NotifyUrgency);
|
|
pub fn notify_notification_show(notification: *mut NotifyNotification, error: *mut *mut glib::GError) -> gboolean;
|
|
pub fn notify_notification_update(notification: *mut NotifyNotification, summary: *const c_char, body: *const c_char, icon: *const c_char) -> gboolean;
|
|
|
|
//=========================================================================
|
|
// Other functions
|
|
//=========================================================================
|
|
pub fn notify_get_app_name() -> *const c_char;
|
|
pub fn notify_get_server_caps() -> *mut glib::GList;
|
|
pub fn notify_get_server_info(ret_name: *mut *mut c_char, ret_vendor: *mut *mut c_char, ret_version: *mut *mut c_char, ret_spec_version: *mut *mut c_char) -> gboolean;
|
|
pub fn notify_init(app_name: *const c_char) -> gboolean;
|
|
pub fn notify_is_initted() -> gboolean;
|
|
pub fn notify_set_app_name(app_name: *const c_char);
|
|
pub fn notify_uninit();
|
|
|
|
}
|