• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GTK_FIXED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_FIXED函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_FIXED函数的具体用法?C++ GTK_FIXED怎么用?C++ GTK_FIXED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_FIXED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: new_layer

GtkWidget *
new_layer(GtkWidget *canvas)
{
 gchar label[10];
 GtkRequisition req;
 gint size;

 nlayers++;

 buttons = (GtkWidget **)g_realloc(buttons, nlayers * sizeof(GtkWidget *));
 plots = (GtkWidget **)g_realloc(plots, nlayers * sizeof(GtkWidget *));

 sprintf(label, "%d", nlayers);
 
 buttons[nlayers-1] = gtk_toggle_button_new_with_label(label);
/* gtk_button_set_relief(GTK_BUTTON(buttons[nlayers-1]), GTK_RELIEF_NONE);
*/
 gtk_widget_size_request(buttons[nlayers-1], &req);
 size = MAX(req.width,req.height);
 gtk_widget_set_size_request(buttons[nlayers-1], size, size);
 gtk_fixed_put(GTK_FIXED(canvas), buttons[nlayers-1], (nlayers-1)*20, 0);
 gtk_widget_show(buttons[nlayers-1]);

 g_signal_connect(GTK_OBJECT(buttons[nlayers-1]), "toggled",
                    (void *) activate_plot, canvas);

 plots[nlayers-1] = gtk_plot_new_with_size(NULL, .5, .25);
 gtk_widget_show(plots[nlayers-1]);

 activate_plot(buttons[nlayers-1],canvas);

 return plots[nlayers-1];
}
开发者ID:2tim,项目名称:gtkextra,代码行数:33,代码来源:testcandles.c


示例2: icon_grid_add

/* Add an icon grid element and establish its initial visibility. */
void icon_grid_add(IconGrid * ig, GtkWidget * child, gboolean visible)
{
    /* Create and initialize a structure representing the child. */
    IconGridElement * ige = g_new0(IconGridElement, 1);
    ige->ig = ig;
    ige->widget = child;
    ige->visible = visible;

    /* Insert at the tail of the child list.  This keeps the graphics in the order they were added. */
    if (ig->child_list == NULL)
        ig->child_list = ige;
    else
    {
        IconGridElement * ige_cursor;
        for (ige_cursor = ig->child_list; ige_cursor->flink != NULL; ige_cursor = ige_cursor->flink) ;
        ige_cursor->flink = ige;
    }

    /* Add the widget to the layout container. */
    if (visible)
        gtk_widget_show(ige->widget);
    gtk_fixed_put(GTK_FIXED(ig->widget), ige->widget, 0, 0);
    g_signal_connect(G_OBJECT(child), "size-request", G_CALLBACK(icon_grid_element_size_request), (gpointer) ige);

    /* Do a relayout. */
    icon_grid_demand_resize(ig);
}
开发者ID:hsgg,项目名称:lxpanel,代码行数:28,代码来源:icon-grid.c


示例3: main

int main (int argc, char *argv[]) {
  
  GtkWidget *window;
  GtkWidget *fixed;
  GtkWidget *button;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title(GTK_WINDOW(window), "GtkButton");
  gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
  gtk_window_set_default_size(GTK_WINDOW(window), 230, 150);

  fixed = gtk_fixed_new();
  gtk_container_add(GTK_CONTAINER(window), fixed);

  button = gtk_button_new_with_label("Click");
  gtk_fixed_put(GTK_FIXED(fixed), button, 50, 50);
  gtk_widget_set_size_request(button, 80, 35);
  
  // Two signals: clicked and destroy
  g_signal_connect(G_OBJECT(button), "clicked",
		   G_CALLBACK(button_clicked), NULL);

  g_signal_connect(G_OBJECT(window), "destroy",
		   G_CALLBACK(gtk_main_quit), NULL);

  gtk_widget_show_all(window);
  gtk_main();

  return 0;
}
开发者ID:nicksexton,项目名称:gui-tools,代码行数:32,代码来源:4_1_callbacks.c


示例4: button_init

void button_init(void)
{
  play_button=gtk_button_new_with_label("Play!");
  gtk_widget_set_size_request(play_button, button_width, button_height);
  gtk_fixed_put(GTK_FIXED(launcher_container), play_button, (launcher_width/2)-(button_width/2), (launcher_height/2)-(button_height/2));
  g_signal_connect_swapped(play_button, "clicked", G_CALLBACK(exec_gnome_terminal), NULL);
}
开发者ID:bensaward,项目名称:game,代码行数:7,代码来源:launcher_initialise.c


示例5: gtk_progress_bar_new

void ProgressBar::create(Window &parent, unsigned x, unsigned y, unsigned width, unsigned height) {
  object->widget = gtk_progress_bar_new();
  widget->parent = &parent;
  gtk_widget_set_size_request(object->widget, width, height);
  gtk_fixed_put(GTK_FIXED(parent.object->formContainer), object->widget, x, y);
  gtk_widget_show(object->widget);
}
开发者ID:meunierd,项目名称:upset,代码行数:7,代码来源:progressbar.cpp


示例6: glide_window_fixed_embed_size_allocate

static void
glide_window_fixed_embed_size_allocate (GtkWidget *widget,
					GtkAllocation *allocation,
					gpointer user_data)
{
  GlideWindow *w = (GlideWindow *)user_data;
  gint width, height;
  
  if (w->priv->document)
    glide_document_get_size (w->priv->document, &width, &height);
  else
    {
      width = DEFAULT_PRESENTATION_WIDTH;
      height = DEFAULT_PRESENTATION_HEIGHT;
    }

  if (allocation->width != w->priv->lfw ||
      allocation->height != w->priv->lfh)
    {
      gtk_fixed_move (GTK_FIXED (widget), w->priv->embed,
		      (allocation->width-width)/2.0,
		      (allocation->height-height)/2.0);
      w->priv->lfw = allocation->width;
      w->priv->lfh = allocation->height;
    }
}
开发者ID:racarr,项目名称:Glide,代码行数:26,代码来源:glide-window.c


示例7: create_window3

GtkWidget*
create_window3 (void)
{
    GtkWidget *window3;
    GdkPixbuf *window3_icon_pixbuf;
    GtkWidget *fixed3;
    GtkWidget *label5;

    window3 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_set_size_request (window3, 236, 122);
    gtk_window_set_title (GTK_WINDOW (window3), _("\346\263\250\345\206\214\350\277\233\350\241\214\344\270\255"));
    gtk_window_set_resizable (GTK_WINDOW (window3), FALSE);
    window3_icon_pixbuf = gdk_pixbuf_new_from_xpm_data((gchar **)connecting_xpm);
    if (window3_icon_pixbuf)
    {
        gtk_window_set_icon (GTK_WINDOW (window3), window3_icon_pixbuf);
        gdk_pixbuf_unref (window3_icon_pixbuf);
    }

    fixed3 = gtk_fixed_new ();
    gtk_widget_show (fixed3);
    gtk_container_add (GTK_CONTAINER (window3), fixed3);

    label5 = gtk_label_new (_("\346\263\250\345\206\214\350\277\233\350\241\214\344\270\255\357\274\214\350\257\267\347\250\215\345\200\231\343\200\202\343\200\202\343\200\202"));
    gtk_widget_show (label5);
    gtk_fixed_put (GTK_FIXED (fixed3), label5, 24, 40);
    gtk_widget_set_size_request (label5, 200, 32);

    /* Store pointers to all widgets, for use by lookup_widget(). */
    GLADE_HOOKUP_OBJECT_NO_REF (window3, window3, "window3");
    GLADE_HOOKUP_OBJECT (window3, fixed3, "fixed3");
    GLADE_HOOKUP_OBJECT (window3, label5, "label5");

    return window3;
}
开发者ID:54chen,项目名称:MyNet,代码行数:35,代码来源:interface.c


示例8: make_cancel_button

void make_cancel_button(GtkWidget *fixed_base)
{
	GtkWidget *fixed;
	GtkWidget *event_box;
	GtkWidget *label;

	fixed = fixed_base;

	label = gtk_label_new(cancel_text);
	gtk_widget_set_size_request(label, cancel_label_width, cancel_label_height);
	gtk_widget_show(label);

	GdkColor white = {0, 65535, 65535, 65535};
	GtkRcStyle *rc_style = gtk_rc_style_new ();
	rc_style->fg[GTK_STATE_NORMAL] = white;
	rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG;
	gtk_widget_modify_style(label, rc_style);
	gtk_rc_style_unref(rc_style);

	event_box = gtk_event_box_new();
	gtk_container_add(GTK_CONTAINER(event_box), label);
	gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box), FALSE);
	gtk_widget_show(event_box);
	g_signal_connect(G_OBJECT(event_box), "enter_notify_event",
						G_CALLBACK(cancel_enter), NULL);
	g_signal_connect(G_OBJECT(event_box), "leave_notify_event",
						G_CALLBACK(cancel_leave), NULL);
	g_signal_connect(G_OBJECT(event_box), "button_press_event",
						G_CALLBACK(cancel_press), NULL);

	gtk_widget_show(event_box);
	gtk_fixed_put(GTK_FIXED(fixed), event_box, cancel_label_pos_x, cancel_label_pos_y);
}
开发者ID:cherry-wb,项目名称:quietheart,代码行数:33,代码来源:main.c


示例9: main

int main (int argc, char *argv[]) {
  
  GtkWidget *window;
  GtkWidget *fixed;
  GtkWidget *button;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
  gtk_window_set_default_size(GTK_WINDOW(window), 230, 150);
  gtk_window_set_title(GTK_WINDOW(window), "enter signal");

  fixed = gtk_fixed_new();
  gtk_container_add(GTK_CONTAINER(window), fixed);

  button = gtk_button_new_with_label("Button");
  gtk_widget_set_size_request(button, 80, 35);
  gtk_fixed_put(GTK_FIXED(fixed), button, 50, 50);

  // call the enter_button() user button when the enter signal occurs
  g_signal_connect(G_OBJECT(button), "enter",
		   G_CALLBACK(enter_button), NULL);

  g_signal_connect_swapped(G_OBJECT(window), "destroy",
			   G_CALLBACK(gtk_main_quit), G_OBJECT(window));

  gtk_widget_show_all(window);
  gtk_main();

  return 0;
}
开发者ID:nicksexton,项目名称:gui-tools,代码行数:32,代码来源:4_3_entersignal.c


示例10: GTK_WIDGET

GtkWidget* wxPizza::New(long windowStyle,void* owner)
{
    GtkWidget* widget = GTK_WIDGET(g_object_new(type(), NULL));
    wxPizza* pizza = WX_PIZZA(widget);
    pizza->m_owner = owner;
    pizza->m_backing_window = NULL;
    pizza->m_scroll_x = 0;
    pizza->m_scroll_y = 0;
    pizza->m_is_scrollable = (windowStyle & (wxHSCROLL | wxVSCROLL)) != 0;
    // mask off border styles not useable with wxPizza
    pizza->m_border_style = int(windowStyle & BORDER_STYLES);
    gtk_fixed_set_has_window(GTK_FIXED(widget), true);
    gtk_widget_add_events(widget,
        GDK_EXPOSURE_MASK |
        GDK_SCROLL_MASK |
        GDK_POINTER_MOTION_MASK |
        GDK_POINTER_MOTION_HINT_MASK |
        GDK_BUTTON_MOTION_MASK |
        GDK_BUTTON1_MOTION_MASK |
        GDK_BUTTON2_MOTION_MASK |
        GDK_BUTTON3_MOTION_MASK |
        GDK_BUTTON_PRESS_MASK |
        GDK_BUTTON_RELEASE_MASK |
        GDK_KEY_PRESS_MASK |
        GDK_KEY_RELEASE_MASK |
        GDK_ENTER_NOTIFY_MASK |
        GDK_LEAVE_NOTIFY_MASK |
        GDK_FOCUS_CHANGE_MASK);
    return widget;
}
开发者ID:jonntd,项目名称:dynamica,代码行数:30,代码来源:win_gtk.cpp


示例11: gtk_drawing_area_new

void Viewport::create(Window &parent, unsigned x, unsigned y, unsigned width, unsigned height) {
  object->widget = gtk_drawing_area_new();
  gtk_widget_set_double_buffered(object->widget, false);
  gtk_widget_set_size_request(object->widget, width, height);
  gtk_fixed_put(GTK_FIXED(parent.object->formContainer), object->widget, x, y);
  gtk_widget_show(object->widget);
}
开发者ID:gilligan,项目名称:bsnes,代码行数:7,代码来源:viewport.cpp


示例12: _GuiWindow_child_resizeCallback

	static void _GuiWindow_child_resizeCallback (GtkWidget *childWidget, gpointer data) {
		GtkAllocation *allocation = (GtkAllocation *) data;
		GtkWidget *parentWidget = gtk_widget_get_parent (childWidget);
		Thing_cast (GuiThing, child, _GuiObject_getUserData (childWidget));
		if (child) {
			GuiControl control = NULL;
			if (Thing_isa (child, classGuiControl)) {
				control = static_cast <GuiControl> (child);
			} else if (Thing_isa (child, classGuiMenu)) {
				Thing_cast (GuiMenu, menu, child);
				control = menu -> d_cascadeButton;
			}
			if (control) {
				/*
				 * Move and resize.
				 */
				trace (U"moving child of class ", Thing_className (control));
				int left = control -> d_left, right = control -> d_right, top = control -> d_top, bottom = control -> d_bottom;
				if (left   <  0) left   += allocation -> width;   // this replicates structGuiControl :: v_positionInForm ()
				if (right  <= 0) right  += allocation -> width;
				if (top    <  0) top    += allocation -> height;
				if (bottom <= 0) bottom += allocation -> height;
				trace (U"moving child to (", left, U",", top, U")");
				gtk_fixed_move (GTK_FIXED (parentWidget), GTK_WIDGET (childWidget), left, top);
				gtk_widget_set_size_request (GTK_WIDGET (childWidget), right - left, bottom - top);
				trace (U"moved child of class ", Thing_className (control));
			}
		}
	}
开发者ID:davideberdin,项目名称:praat,代码行数:29,代码来源:GuiWindow.cpp


示例13: gtk_fixed_move

void VLGbutton::moveTo(int nx,int ny) {
    if (parent)	{
        gtk_fixed_move (GTK_FIXED (((VLGform*)parent)->fixed), widget, nx, ny);
        x=nx;
        y=ny;
    }
}
开发者ID:BackupTheBerlios,项目名称:dodona-svn,代码行数:7,代码来源:VLGbutton.cpp


示例14: NSA_GET_PTR

JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkLabelPeer_setNativeBounds
  (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
{
  GtkWidget *widget;
  void *ptr;

  ptr = NSA_GET_PTR (env, obj);

  gdk_threads_enter ();

  widget = GTK_WIDGET (ptr);

  /* We assume that -1 is a width or height and not a request for the
     widget's natural size. */
  width = width < 0 ? 0 : width;
  height = height < 0 ? 0 : height;

  if (!(width == 0 && height == 0))
    {
      /* Set the event box's size request... */
      gtk_widget_set_size_request (widget, width, height);
      /* ...and the label's size request. */
      gtk_widget_set_size_request (gtk_bin_get_child (GTK_BIN (widget)),
                                   width, height);

      if (widget->parent != NULL)
        gtk_fixed_move (GTK_FIXED (widget->parent), widget, x, y);
    }

  gdk_threads_leave ();
}
开发者ID:BackupTheBerlios,项目名称:iphone-binutils-svn,代码行数:32,代码来源:gnu_java_awt_peer_gtk_GtkLabelPeer.c


示例15: main

int main(int argc, char **argv)
{
    GtkWidget *window;
    GtkWidget *fixed;
    GtkWidget *button;
    gint i;

    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(window), "Fixed Container");
    g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
    gtk_container_set_border_width(GTK_CONTAINER(window), 10);

    fixed = gtk_fixed_new();
    gtk_container_add(GTK_CONTAINER(window), fixed);
    gtk_widget_show(fixed);

    for(i=1; i<=3; i++)
    {
        button = gtk_button_new_with_label("Press me");
        g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(move_button), fixed);
        gtk_fixed_put(GTK_FIXED(fixed), button, i*50, i*50);
        gtk_widget_show(button);
    }

    gtk_widget_show(window);
    gtk_main();
    
    return 0;
}
开发者ID:farthought,项目名称:code,代码行数:31,代码来源:fixedcontainer.c


示例16: move_button

/* This callback function moves the button to a new position
 * in the Fixed container. */
void move_button( GtkWidget *widget,
                  GtkWidget *fixed )
{
  x = (x+30)%300;
  y = (y+50)%300;
  gtk_fixed_move( GTK_FIXED(fixed), widget, x, y); 
}
开发者ID:dimkr,项目名称:gtk,代码行数:9,代码来源:fixed.c


示例17: GTK_WIDGET

GtkWidget* wxPizza::New(long windowStyle)
{
    GtkWidget* widget = GTK_WIDGET(g_object_new(type(), NULL));
    wxPizza* pizza = WX_PIZZA(widget);
    pizza->m_scroll_x = 0;
    pizza->m_scroll_y = 0;
    pizza->m_is_scrollable = (windowStyle & (wxHSCROLL | wxVSCROLL)) != 0;
    // mask off border styles not useable with wxPizza
    pizza->m_border_style = int(windowStyle & BORDER_STYLES);
#if GTK_CHECK_VERSION(3,0,0) || defined(GTK_DISABLE_DEPRECATED)
    gtk_widget_set_has_window(widget, true);
#else
    gtk_fixed_set_has_window(GTK_FIXED(widget), true);
#endif
    gtk_widget_add_events(widget,
        GDK_EXPOSURE_MASK |
        GDK_SCROLL_MASK |
        GDK_POINTER_MOTION_MASK |
        GDK_POINTER_MOTION_HINT_MASK |
        GDK_BUTTON_MOTION_MASK |
        GDK_BUTTON1_MOTION_MASK |
        GDK_BUTTON2_MOTION_MASK |
        GDK_BUTTON3_MOTION_MASK |
        GDK_BUTTON_PRESS_MASK |
        GDK_BUTTON_RELEASE_MASK |
        GDK_KEY_PRESS_MASK |
        GDK_KEY_RELEASE_MASK |
        GDK_ENTER_NOTIFY_MASK |
        GDK_LEAVE_NOTIFY_MASK |
        GDK_FOCUS_CHANGE_MASK);
    return widget;
}
开发者ID:Richard-Ni,项目名称:wxWidgets,代码行数:32,代码来源:win_gtk.cpp


示例18: g_date_time_new_now_local

void CalendarDatePrivate::initMonthView() {
    GtkWidget* swipebox = NULL;
    int row = 0;
    int col = 0;
    int rowCount = 3;
    int colCount = 4;
    GDateTime* nowDate = g_date_time_new_now_local();
    int selectedYear = m_selectedYear;
    int cellWidth = MAIN_BOX_DEFAULT_WIDTH / colCount;
    int cellHeight = MAIN_BOX_DEFAULT_WIDTH / rowCount;

    m_swipeBox[VIEWTYPE_MONTH] = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
    swipebox = m_swipeBox[VIEWTYPE_MONTH];

    gtk_fixed_put(GTK_FIXED(m_mainBox), GTK_WIDGET(m_swipeBox[VIEWTYPE_MONTH]), 0, 0);
    gtk_widget_set_name(GTK_WIDGET(swipebox), "calendar-table");

    GDateTime* selectedDate = g_date_time_new_local(m_selectedYear, m_selectedMonth, m_selectedDayOfMonth, 1, 1, 1);
    gchar* dateLabelText = g_date_time_format(selectedDate, C_("calendar heading", "%Y"));
    gtk_button_set_label(GTK_BUTTON(m_viewTypeSwitch), dateLabelText);
    g_date_time_unref(selectedDate);
    g_free(dateLabelText);

    for (row = 0; row < rowCount; ++row) {
        GtkWidget* monthlayout = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
        for (col = 0; col < colCount; ++col) {
            int index = row * colCount + col;
            m_monthItem[index] = new CalendarItem(ITEMTYPE_MONTH, index + 1);
            m_monthItem[index]->setOnClickedListener(this);
            m_monthItem[index]->setSize(cellWidth, cellHeight);
            m_monthItem[index]->setParent(GTK_WIDGET(monthlayout));
        }
        gtk_box_pack_start(GTK_BOX(swipebox), GTK_WIDGET(monthlayout), TRUE, TRUE, 0);
    }
}
开发者ID:jimline,项目名称:TestProjects,代码行数:35,代码来源:CalendarDate.cpp


示例19: gdk_threads_enter

JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetParent
  (JNIEnv *env, jobject obj, jobject parent)
{
  void *ptr;
  void *parent_ptr;
  GtkWidget *widget;
  GtkWidget *parent_widget;

  gdk_threads_enter ();

  ptr = gtkpeer_get_widget (env, obj);
  parent_ptr = gtkpeer_get_widget (env, parent);
  
  widget = GTK_WIDGET (ptr);
  parent_widget = get_widget(GTK_WIDGET (parent_ptr));

  if (widget->parent == NULL)
    {
      if (GTK_IS_WINDOW (parent_widget))
	{
	  GList *children = gtk_container_get_children
	    (GTK_CONTAINER (parent_widget));

          if (GTK_IS_MENU_BAR (children->data))
            gtk_fixed_put (GTK_FIXED (children->next->data), widget, 0, 0);
          else
            gtk_fixed_put (GTK_FIXED (children->data), widget, 0, 0);
        }
      else
        if (GTK_IS_SCROLLED_WINDOW (parent_widget))
          {
            gtk_scrolled_window_add_with_viewport 
              (GTK_SCROLLED_WINDOW (parent_widget), widget);
            gtk_viewport_set_shadow_type (GTK_VIEWPORT (widget->parent), 
                                          GTK_SHADOW_NONE);

          }
        else
          {
            if (widget->parent == NULL)
              gtk_fixed_put (GTK_FIXED (parent_widget), widget, 0, 0);
          }
    }

  gdk_threads_leave ();
}
开发者ID:0day-ci,项目名称:gcc,代码行数:47,代码来源:gnu_java_awt_peer_gtk_GtkComponentPeer.c


示例20: printf

void *GtkMain(void * argument)
{
    printf("%s:%d\n", __func__, __LINE__);

    int argc = 0;
    char**argv = NULL;

    unsigned char haveUrl = 0;
    int argCount = 0;

    gtk_init (&argc, &argv);
    if (!g_thread_supported ())
        g_thread_init (NULL);

    GtkWidget* fixed = gtk_fixed_new();
    //screen_changed(fixed, NULL, NULL);
    g_vbox = gtk_vbox_new (FALSE, 0);
    gtk_box_pack_start (GTK_BOX (g_vbox), create_toolbar (), FALSE, FALSE, 0);
    gtk_box_pack_start (GTK_BOX (g_vbox), GTK_WIDGET (create_browser ()), TRUE, TRUE, 0);
    gtk_box_pack_start (GTK_BOX (g_vbox), create_statusbar (), FALSE, FALSE, 0);

    g_window = create_window ();

    gtk_fixed_put(GTK_FIXED(fixed), g_vbox, 0, 0);
    gtk_widget_set_size_request(g_vbox, g_framebuffer_width, g_framebuffer_height);

    GtkWidget* statusLabel = gtk_label_new ("Status");
    gtk_fixed_put(GTK_FIXED(fixed), statusLabel, g_framebuffer_width - 200, 0);
    gtk_widget_set_size_request(statusLabel, 200, 100);

    gtk_container_add (GTK_CONTAINER (g_window), fixed);

    webkit_web_view_load_uri (g_web_view, g_url);

    gtk_widget_grab_focus (GTK_WIDGET (g_web_view));
    gtk_widget_show_all (g_window);

    toogleMode();

    g_default_scale = g_framebuffer_width / 1280.0f;
    handleZoomLock(0);

    g_Callback(1);

    gtk_main ();
    return NULL;
}
开发者ID:beto1014,项目名称:eve-browser,代码行数:47,代码来源:main.c



注:本文中的GTK_FIXED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_FONT_BUTTON函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_FILE_SELECTION函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap