⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callbacks.h

📁 用GTK实现的一个简单的计算器程序
💻 H
字号:
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- *//* * callbacks.h * Copyright (C) Nick Z Liu 2008 <nick@> *  * callbacks.h is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *  * callbacks.h is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License along * with this program.  If not, see <http://www.gnu.org/licenses/>. */#include <gtk/gtk.h>#include "mult.h"/*******************added by nick********************//*#define CACULATOR_MAX_NUMBER_LEN 20typedef enum{    OPERATION_STATE_ENTER_A = 0,    OPERATION_STATE_ENTER_OPERATOR,    OPERATION_STATE_ENTER_B,    OPERATION_STATE_SHOW_RESULT} t_operation_state;extern float g_operand_a;extern float g_operand_b;extern char g_operator;extern t_operation_state g_operation_state;*///#define USE_GLADE#ifdef USE_GLADEextern void number_button_clicked_cb(gpointer user_data, GtkButton *button);extern void on_imagemenuitem_about_activate(gpointer user_data, GtkWidget *widget);#elseextern void number_button_clicked_cb(GtkButton *button, gpointer user_data);extern void on_imagemenuitem_about_activate(GtkWidget *widget, gpointer user_data);#endifextern void on_window_delete_event(gpointer user_data, GtkWidget* widget);extern void on_window_destroy_event(gpointer user_data, GtkWidget* widget);extern void on_window_remove(gpointer user_data, GtkWidget *widget);/*****************end added by nick******************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -