115
115
static void unity_panel_window_buttons_real_get_preferred_width (ClutterActor* base, float for_height, float* min_width, float* nat_width);
116
116
UnityPanelWindowButton* unity_panel_window_button_new (const char* filename);
117
117
UnityPanelWindowButton* unity_panel_window_button_construct (GType object_type, const char* filename);
118
static void _lambda7_ (UnityPanelWindowButtons* self);
119
static void __lambda7__ctk_button_clicked (CtkButton* _sender, gpointer self);
120
static void _lambda8_ (UnityPanelWindowButtons* self);
121
static void __lambda8__ctk_button_clicked (CtkButton* _sender, gpointer self);
122
118
static void _lambda9_ (UnityPanelWindowButtons* self);
123
119
static void __lambda9__ctk_button_clicked (CtkButton* _sender, gpointer self);
120
static void _lambda10_ (UnityPanelWindowButtons* self);
121
static void __lambda10__ctk_button_clicked (CtkButton* _sender, gpointer self);
122
static void _lambda11_ (UnityPanelWindowButtons* self);
123
static void __lambda11__ctk_button_clicked (CtkButton* _sender, gpointer self);
124
124
static void _unity_panel_window_buttons_on_active_window_changed_bamf_matcher_active_window_changed (BamfMatcher* _sender, GObject* object, GObject* p0, gpointer self);
125
static void _lambda10_ (UnityPanelWindowButtons* self);
126
static gboolean _lambda11_ (UnityPanelWindowButtons* self);
127
static gboolean __lambda11__gsource_func (gpointer self);
128
static void __lambda10__unity_shell_active_window_state_changed (UnityShell* _sender, gpointer self);
129
static gboolean _lambda12_ (UnityPanelWindowButtons* self);
130
static gboolean __lambda12__gsource_func (gpointer self);
125
static void _lambda12_ (UnityPanelWindowButtons* self);
126
static gboolean _lambda13_ (UnityPanelWindowButtons* self);
127
static gboolean __lambda13__gsource_func (gpointer self);
128
static void __lambda12__unity_shell_active_window_state_changed (UnityShell* _sender, gpointer self);
129
static gboolean _lambda14_ (UnityPanelWindowButtons* self);
130
static gboolean __lambda14__gsource_func (gpointer self);
131
131
static GObject * unity_panel_window_buttons_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
132
132
static void unity_panel_window_buttons_finalize (GObject* obj);
133
133
#define UNITY_PANEL_WINDOW_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PANEL_TYPE_WINDOW_BUTTON, UnityPanelWindowButtonPrivate))
277
static void _lambda7_ (UnityPanelWindowButtons* self) {
277
static void _lambda9_ (UnityPanelWindowButtons* self) {
278
278
if (self->priv->last_xid > 0) {
279
279
unity_shell_do_window_action (unity_global_shell, self->priv->last_xid, UNITY_WINDOW_ACTION_CLOSE);
284
static void __lambda7__ctk_button_clicked (CtkButton* _sender, gpointer self) {
284
static void __lambda9__ctk_button_clicked (CtkButton* _sender, gpointer self) {
289
static void _lambda8_ (UnityPanelWindowButtons* self) {
289
static void _lambda10_ (UnityPanelWindowButtons* self) {
290
290
if (self->priv->last_xid > 0) {
291
291
unity_shell_do_window_action (unity_global_shell, self->priv->last_xid, UNITY_WINDOW_ACTION_MINIMIZE);
296
static void __lambda8__ctk_button_clicked (CtkButton* _sender, gpointer self) {
296
static void __lambda10__ctk_button_clicked (CtkButton* _sender, gpointer self) {
301
static void _lambda9_ (UnityPanelWindowButtons* self) {
301
static void _lambda11_ (UnityPanelWindowButtons* self) {
302
302
if (self->priv->last_xid > 0) {
303
303
unity_shell_do_window_action (unity_global_shell, self->priv->last_xid, UNITY_WINDOW_ACTION_UNMAXIMIZE);
308
static void __lambda9__ctk_button_clicked (CtkButton* _sender, gpointer self) {
308
static void __lambda11__ctk_button_clicked (CtkButton* _sender, gpointer self) {
318
static gboolean _lambda11_ (UnityPanelWindowButtons* self) {
319
gboolean result = FALSE;
322
win = bamf_matcher_get_active_window (self->priv->matcher);
323
unity_panel_window_buttons_on_active_window_changed (self, NULL, (_tmp0_ = win, G_IS_OBJECT (_tmp0_) ? ((GObject*) _tmp0_) : NULL));
329
static gboolean __lambda11__gsource_func (gpointer self) {
331
result = _lambda11_ (self);
336
static void _lambda10_ (UnityPanelWindowButtons* self) {
337
g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda11__gsource_func, g_object_ref (self), g_object_unref);
341
static void __lambda10__unity_shell_active_window_state_changed (UnityShell* _sender, gpointer self) {
346
static gboolean _lambda12_ (UnityPanelWindowButtons* self) {
347
gboolean result = FALSE;
350
win = bamf_matcher_get_active_window (self->priv->matcher);
351
unity_panel_window_buttons_on_active_window_changed (self, NULL, (_tmp0_ = win, G_IS_OBJECT (_tmp0_) ? ((GObject*) _tmp0_) : NULL));
357
static gboolean __lambda12__gsource_func (gpointer self) {
359
result = _lambda12_ (self);
318
static gboolean _lambda13_ (UnityPanelWindowButtons* self) {
319
gboolean result = FALSE;
322
win = bamf_matcher_get_active_window (self->priv->matcher);
323
unity_panel_window_buttons_on_active_window_changed (self, NULL, (_tmp0_ = win, G_IS_OBJECT (_tmp0_) ? ((GObject*) _tmp0_) : NULL));
329
static gboolean __lambda13__gsource_func (gpointer self) {
331
result = _lambda13_ (self);
336
static void _lambda12_ (UnityPanelWindowButtons* self) {
337
g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 0, __lambda13__gsource_func, g_object_ref (self), g_object_unref);
341
static void __lambda12__unity_shell_active_window_state_changed (UnityShell* _sender, gpointer self) {
346
static gboolean _lambda14_ (UnityPanelWindowButtons* self) {
347
gboolean result = FALSE;
350
win = bamf_matcher_get_active_window (self->priv->matcher);
351
unity_panel_window_buttons_on_active_window_changed (self, NULL, (_tmp0_ = win, G_IS_OBJECT (_tmp0_) ? ((GObject*) _tmp0_) : NULL));
357
static gboolean __lambda14__gsource_func (gpointer self) {
359
result = _lambda14_ (self);
380
380
ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->priv->appname, TRUE, TRUE);
381
381
self->priv->close = (_tmp1_ = g_object_ref_sink (unity_panel_window_button_new ("close")), _g_object_unref0 (self->priv->close), _tmp1_);
382
382
ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->priv->close, FALSE, FALSE);
383
g_signal_connect_object ((CtkButton*) self->priv->close, "clicked", (GCallback) __lambda7__ctk_button_clicked, self, 0);
383
g_signal_connect_object ((CtkButton*) self->priv->close, "clicked", (GCallback) __lambda9__ctk_button_clicked, self, 0);
384
384
self->priv->minimize = (_tmp2_ = g_object_ref_sink (unity_panel_window_button_new ("minimize")), _g_object_unref0 (self->priv->minimize), _tmp2_);
385
385
ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->priv->minimize, FALSE, FALSE);
386
g_signal_connect_object ((CtkButton*) self->priv->minimize, "clicked", (GCallback) __lambda8__ctk_button_clicked, self, 0);
386
g_signal_connect_object ((CtkButton*) self->priv->minimize, "clicked", (GCallback) __lambda10__ctk_button_clicked, self, 0);
387
387
self->priv->unmaximize = (_tmp3_ = g_object_ref_sink (unity_panel_window_button_new ("unmaximize")), _g_object_unref0 (self->priv->unmaximize), _tmp3_);
388
388
ctk_box_pack ((CtkBox*) self, (ClutterActor*) self->priv->unmaximize, FALSE, FALSE);
389
g_signal_connect_object ((CtkButton*) self->priv->unmaximize, "clicked", (GCallback) __lambda9__ctk_button_clicked, self, 0);
389
g_signal_connect_object ((CtkButton*) self->priv->unmaximize, "clicked", (GCallback) __lambda11__ctk_button_clicked, self, 0);
390
390
self->priv->appinfo = (_tmp4_ = unity_app_info_manager_get_instance (), _g_object_unref0 (self->priv->appinfo), _tmp4_);
391
391
self->priv->matcher = bamf_matcher_get_default ();
392
392
g_signal_connect_object (self->priv->matcher, "active-window-changed", (GCallback) _unity_panel_window_buttons_on_active_window_changed_bamf_matcher_active_window_changed, self, 0);
393
g_signal_connect_object (unity_global_shell, "active-window-state-changed", (GCallback) __lambda10__unity_shell_active_window_state_changed, self, 0);
394
g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda12__gsource_func, g_object_ref (self), g_object_unref);
393
g_signal_connect_object (unity_global_shell, "active-window-state-changed", (GCallback) __lambda12__unity_shell_active_window_state_changed, self, 0);
394
g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, __lambda14__gsource_func, g_object_ref (self), g_object_unref);