Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* window.c generated by valac 0.14.0.34-0d07f, the Vala compiler
- * generated from window.vala, do not modify */
- #include <glib.h>
- #include <glib-object.h>
- #include <gtk/gtk.h>
- #include <cairo.h>
- #include <pango/pango.h>
- #include <stdlib.h>
- #include <string.h>
- #include <meta/theme.h>
- #include <meta/main.h>
- #include <gdk-pixbuf/gdk-pixbuf.h>
- #define TYPE_TEST (test_get_type ())
- #define TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST, Test))
- #define TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST, TestClass))
- #define IS_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST))
- #define IS_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST))
- #define TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST, TestClass))
- typedef struct _Test Test;
- typedef struct _TestClass TestClass;
- typedef struct _TestPrivate TestPrivate;
- #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
- #define _meta_theme_free0(var) ((var == NULL) ? NULL : (var = (meta_theme_free (var), NULL)))
- struct _Test {
- GtkDrawingArea parent_instance;
- TestPrivate * priv;
- };
- struct _TestClass {
- GtkDrawingAreaClass parent_class;
- };
- static gpointer test_parent_class = NULL;
- GType test_get_type (void) G_GNUC_CONST;
- enum {
- TEST_DUMMY_PROPERTY
- };
- Test* test_new (void);
- Test* test_construct (GType object_type);
- static gboolean test_on_draw (Test* self, cairo_t* cairo_cx);
- static gboolean _test_on_draw_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self);
- gint _vala_main (gchar** args, int args_length1);
- static gboolean _test_on_draw_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
- gboolean result;
- result = test_on_draw (self, cr);
- #line 5 "/home/and471/Desktop/window.vala"
- return result;
- #line 59 "window.c"
- }
- Test* test_construct (GType object_type) {
- Test * self = NULL;
- #line 3 "/home/and471/Desktop/window.vala"
- self = (Test*) g_object_new (object_type, NULL);
- #line 5 "/home/and471/Desktop/window.vala"
- g_signal_connect_object ((GtkWidget*) self, "draw", (GCallback) _test_on_draw_gtk_widget_draw, self, 0);
- #line 3 "/home/and471/Desktop/window.vala"
- return self;
- #line 71 "window.c"
- }
- Test* test_new (void) {
- #line 3 "/home/and471/Desktop/window.vala"
- return test_construct (TYPE_TEST);
- #line 78 "window.c"
- }
- static gboolean test_on_draw (Test* self, cairo_t* cairo_cx) {
- gboolean result = FALSE;
- PangoContext* _tmp0_ = NULL;
- PangoLayout* _tmp1_;
- PangoLayout* layout;
- PangoLayout* _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- MetaTheme* _tmp5_ = NULL;
- MetaTheme* theme;
- MetaButtonLayout button_layout = {0};
- MetaButtonFunction _tmp6_;
- MetaButtonState* _tmp7_ = NULL;
- MetaButtonState* button_states;
- gint button_states_length1;
- gint _button_states_size_;
- GtkIconTheme* _tmp8_ = NULL;
- GdkPixbuf* _tmp9_ = NULL;
- GdkPixbuf* _tmp10_;
- GtkIconTheme* _tmp11_ = NULL;
- GdkPixbuf* _tmp12_ = NULL;
- GdkPixbuf* _tmp13_;
- MetaTheme* _tmp14_;
- cairo_t* _tmp15_;
- PangoLayout* _tmp16_;
- MetaButtonLayout _tmp17_;
- MetaButtonState* _tmp18_;
- gint _tmp18__length1;
- GdkPixbuf* _tmp19_;
- GdkPixbuf* _tmp20_;
- GError * _inner_error_ = NULL;
- #line 8 "/home/and471/Desktop/window.vala"
- g_return_val_if_fail (self != NULL, FALSE);
- #line 8 "/home/and471/Desktop/window.vala"
- g_return_val_if_fail (cairo_cx != NULL, FALSE);
- #line 11 "/home/and471/Desktop/window.vala"
- _tmp0_ = gtk_widget_get_pango_context ((GtkWidget*) self);
- #line 11 "/home/and471/Desktop/window.vala"
- _tmp1_ = pango_layout_new (_tmp0_);
- #line 11 "/home/and471/Desktop/window.vala"
- layout = _tmp1_;
- #line 12 "/home/and471/Desktop/window.vala"
- _tmp2_ = layout;
- #line 12 "/home/and471/Desktop/window.vala"
- _tmp3_ = strlen ("Hi");
- #line 12 "/home/and471/Desktop/window.vala"
- _tmp4_ = _tmp3_;
- #line 12 "/home/and471/Desktop/window.vala"
- pango_layout_set_text (_tmp2_, "Hi", _tmp4_);
- #line 14 "/home/and471/Desktop/window.vala"
- _tmp5_ = meta_theme_load ("Adwaita", &_inner_error_);
- #line 14 "/home/and471/Desktop/window.vala"
- theme = _tmp5_;
- #line 14 "/home/and471/Desktop/window.vala"
- if (_inner_error_ != NULL) {
- #line 14 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (layout);
- #line 14 "/home/and471/Desktop/window.vala"
- g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
- #line 14 "/home/and471/Desktop/window.vala"
- g_clear_error (&_inner_error_);
- #line 14 "/home/and471/Desktop/window.vala"
- return FALSE;
- #line 145 "window.c"
- }
- #line 16 "/home/and471/Desktop/window.vala"
- memset (&button_layout, 0, sizeof (MetaButtonLayout));
- #line 17 "/home/and471/Desktop/window.vala"
- button_layout.left_buttons[0] = META_BUTTON_FUNCTION_CLOSE;
- #line 17 "/home/and471/Desktop/window.vala"
- _tmp6_ = button_layout.left_buttons[0];
- #line 19 "/home/and471/Desktop/window.vala"
- _tmp7_ = g_new0 (MetaButtonState, 1);
- #line 19 "/home/and471/Desktop/window.vala"
- _tmp7_[0] = META_BUTTON_STATE_NORMAL;
- #line 19 "/home/and471/Desktop/window.vala"
- button_states = _tmp7_;
- #line 19 "/home/and471/Desktop/window.vala"
- button_states_length1 = 1;
- #line 19 "/home/and471/Desktop/window.vala"
- _button_states_size_ = button_states_length1;
- #line 30 "/home/and471/Desktop/window.vala"
- _tmp8_ = gtk_icon_theme_get_default ();
- #line 30 "/home/and471/Desktop/window.vala"
- _tmp9_ = gtk_icon_theme_load_icon (_tmp8_, "folder", 16, GTK_ICON_LOOKUP_FORCE_SVG, &_inner_error_);
- #line 30 "/home/and471/Desktop/window.vala"
- _tmp10_ = _tmp9_;
- #line 30 "/home/and471/Desktop/window.vala"
- if (_inner_error_ != NULL) {
- #line 30 "/home/and471/Desktop/window.vala"
- button_states = (g_free (button_states), NULL);
- #line 30 "/home/and471/Desktop/window.vala"
- _meta_theme_free0 (theme);
- #line 30 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (layout);
- #line 30 "/home/and471/Desktop/window.vala"
- g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
- #line 30 "/home/and471/Desktop/window.vala"
- g_clear_error (&_inner_error_);
- #line 30 "/home/and471/Desktop/window.vala"
- return FALSE;
- #line 183 "window.c"
- }
- #line 31 "/home/and471/Desktop/window.vala"
- _tmp11_ = gtk_icon_theme_get_default ();
- #line 31 "/home/and471/Desktop/window.vala"
- _tmp12_ = gtk_icon_theme_load_icon (_tmp11_, "folder", 16, GTK_ICON_LOOKUP_FORCE_SVG, &_inner_error_);
- #line 31 "/home/and471/Desktop/window.vala"
- _tmp13_ = _tmp12_;
- #line 31 "/home/and471/Desktop/window.vala"
- if (_inner_error_ != NULL) {
- #line 31 "/home/and471/Desktop/window.vala"
- button_states = (g_free (button_states), NULL);
- #line 31 "/home/and471/Desktop/window.vala"
- _meta_theme_free0 (theme);
- #line 31 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (layout);
- #line 31 "/home/and471/Desktop/window.vala"
- g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
- #line 31 "/home/and471/Desktop/window.vala"
- g_clear_error (&_inner_error_);
- #line 31 "/home/and471/Desktop/window.vala"
- return FALSE;
- #line 205 "window.c"
- }
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp14_ = theme;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp15_ = cairo_cx;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp16_ = layout;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp17_ = button_layout;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp18_ = button_states;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp18__length1 = button_states_length1;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp19_ = _tmp10_;
- #line 21 "/home/and471/Desktop/window.vala"
- _tmp20_ = _tmp13_;
- #line 21 "/home/and471/Desktop/window.vala"
- meta_theme_draw_frame (_tmp14_, (GtkWidget*) self, _tmp15_, META_FRAME_TYPE_NORMAL, META_FRAME_HAS_FOCUS, 400, 50, _tmp16_, 20, &_tmp17_, _tmp18_, _tmp19_, _tmp20_);
- #line 21 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (_tmp20_);
- #line 21 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (_tmp19_);
- #line 32 "/home/and471/Desktop/window.vala"
- result = FALSE;
- #line 32 "/home/and471/Desktop/window.vala"
- button_states = (g_free (button_states), NULL);
- #line 32 "/home/and471/Desktop/window.vala"
- _meta_theme_free0 (theme);
- #line 32 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (layout);
- #line 32 "/home/and471/Desktop/window.vala"
- return result;
- #line 239 "window.c"
- }
- static void test_class_init (TestClass * klass) {
- #line 1 "/home/and471/Desktop/window.vala"
- test_parent_class = g_type_class_peek_parent (klass);
- #line 246 "window.c"
- }
- static void test_instance_init (Test * self) {
- }
- GType test_get_type (void) {
- static volatile gsize test_type_id__volatile = 0;
- if (g_once_init_enter (&test_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (TestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Test), 0, (GInstanceInitFunc) test_instance_init, NULL };
- GType test_type_id;
- test_type_id = g_type_register_static (GTK_TYPE_DRAWING_AREA, "Test", &g_define_type_info, 0);
- g_once_init_leave (&test_type_id__volatile, test_type_id);
- }
- return test_type_id__volatile;
- }
- gint _vala_main (gchar** args, int args_length1) {
- gint result = 0;
- Test* _tmp0_;
- Test* _tmp1_;
- Test* t;
- GtkWindow* _tmp2_;
- GtkWindow* _tmp3_;
- GtkWindow* w;
- #line 37 "/home/and471/Desktop/window.vala"
- gtk_init (&args_length1, &args);
- #line 39 "/home/and471/Desktop/window.vala"
- _tmp0_ = test_new ();
- #line 39 "/home/and471/Desktop/window.vala"
- _tmp1_ = g_object_ref_sink (_tmp0_);
- #line 39 "/home/and471/Desktop/window.vala"
- t = _tmp1_;
- #line 40 "/home/and471/Desktop/window.vala"
- _tmp2_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL);
- #line 40 "/home/and471/Desktop/window.vala"
- _tmp3_ = g_object_ref_sink (_tmp2_);
- #line 40 "/home/and471/Desktop/window.vala"
- w = _tmp3_;
- #line 41 "/home/and471/Desktop/window.vala"
- gtk_container_add ((GtkContainer*) w, (GtkWidget*) t);
- #line 43 "/home/and471/Desktop/window.vala"
- gtk_widget_show_all ((GtkWidget*) w);
- #line 44 "/home/and471/Desktop/window.vala"
- gtk_main ();
- #line 45 "/home/and471/Desktop/window.vala"
- result = 0;
- #line 45 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (w);
- #line 45 "/home/and471/Desktop/window.vala"
- _g_object_unref0 (t);
- #line 45 "/home/and471/Desktop/window.vala"
- return result;
- #line 302 "window.c"
- }
- int main (int argc, char ** argv) {
- #line 36 "/home/and471/Desktop/window.vala"
- g_type_init ();
- #line 36 "/home/and471/Desktop/window.vala"
- return _vala_main (argv, argc);
- #line 311 "window.c"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement