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

C++ OBJECT_POINTER函数代码示例

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

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



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

示例1: tab_init

struct tab* tab_init(void)
{
    struct tab * addr;

    /* 分配存储空间 */
    addr = (struct tab *)malloc(sizeof(struct tab));

    if(addr == NULL) {
        EGUI_PRINT_SYS_ERROR("fail to malloc");
        return NULL;
    }

    if(NULL == (addr = widget_init_common(WIDGET_POINTER(addr), 0))) {
        return NULL;
    }
    /* struct tab 的成员 */
    addr->name = "struct tab";

    /* 用全局样式对象初始化tab样式 */
    tab_init_with_default_style(addr);

    addr->border_size = 0;

    addr->header = tab_header_init();
    addr->header->parent_tab = addr;
    object_attach_child(OBJECT_POINTER(addr),
            OBJECT_POINTER(addr->header));

    return addr;
}
开发者ID:ssdutyuyang199401,项目名称:egui,代码行数:30,代码来源:tab.c


示例2: save_as_button_callback

si_t save_as_button_callback(void* btn, void* msg)
{
    union message* m = (union message*)msg;
	struct button* b = NULL;
	switch(m->base.type)
	{
	case MESSAGE_TYPE_MOUSE_SINGLE_CLICK:
		if(NULL == save_window)
		{
			save_window = window_init("save window");
            /* 申请失败 */
            if(NULL == main_window)
            {
				EGUI_PRINT_ERROR("failed to init save window");
				application_exit();
                return -1;
            }
			window_set_bounds(save_window, main_window->area.x + 30, main_window->area.y + 30, 300, 60);
			window_set_color(save_window, NULL, &barely_blue);

			save_text_line = text_line_init(FILE_MAX, 0);
			if(NULL == save_text_line)
			{
				EGUI_PRINT_ERROR("failed to init save_text_line on save window");
				application_exit();
				return -1;
			}
			text_line_set_bounds(save_text_line, 5, 5, 230, 50);
			text_line_set_placeholder(save_text_line, "input file name");
			text_line_set_color(save_text_line, &dark_blue, NULL, &light_green);

			b = button_init("ok");
			if(NULL == b)
			{
				EGUI_PRINT_ERROR("failed to init ok button on save window");
				application_exit();
				return -1;
			}
			button_set_bounds(b, 240, 10, 50, 40);
			button_set_color(b, &dark_blue, &light_green);
			button_set_font(b, FONT_MATRIX_12);
			b->callback = save_window_ok_button_callback;

			object_attach_child(OBJECT_POINTER(save_window), OBJECT_POINTER(b));
			object_attach_child(OBJECT_POINTER(save_window), OBJECT_POINTER(save_text_line));
			application_add_window(NULL, save_window);
			break;
		}
		else
		{
			EGUI_PRINT_ERROR("save window already open!");
		}
	default:
		button_default_callback(btn, msg);
	}
	return 0;
}
开发者ID:FangKuangKuang,项目名称:egui,代码行数:57,代码来源:editerbasic.c


示例3: main

int main()
{
    si_t video_access_mode = VIDEO_ACCESS_MODE_BUFFER;
	si_t app_type = APPLICATION_TYPE_NORMAL;
    struct window * w;
    struct scroll_bar* s;
    struct label* l;
    char show[25];

    /* 初始化用户应用程序 */
    application_init(video_access_mode, app_type, "scroll_bar");

    /* 申请窗口 */
    w = window_init("window with scroll_bar");
    /* 申请失败 */
    if(w == NULL)
    {
        application_exit();
        return -1;
    }
	window_set_bounds(w, 300, 100, 448, 200);

    s = scroll_bar_init(1, 400, 20);
    /* 申请失败 */
    if(s == NULL)
    {
        application_exit();
        return -1;
    }
	scroll_bar_set_bounds(s, 428, 0, 20, 200);
 
    l = label_init(show);
    /* 申请失败 */
    if(l == NULL)
    {
        application_exit();
        return -1;
    }
	label_set_bounds(l, 10, 40, 400, 20);
    sprintf(show, "not started");

    scroll_bar_register_move_handler(s, WIDGET_POINTER(l), SCROLL_BAR_EVENT_ALL, label_handler);
   
    object_attach_child(OBJECT_POINTER(w), OBJECT_POINTER(s));
    object_attach_child(OBJECT_POINTER(w), OBJECT_POINTER(l));

    /* 添加顶层窗口 */
    application_add_window(NULL, w);
    /* 设置主窗口 */
    application_set_main_window(w);

    /* 运行 */
    application_exec();

    return 0;
}
开发者ID:FangKuangKuang,项目名称:egui,代码行数:56,代码来源:test_scroll_bar.c


示例4: MygEventMonsterItemDrop

int MygEventMonsterItemDrop(BYTE *b_MonsterDataAddr,BYTE *a_gObjAddr)
	// 2Class = 1, 17, 33, 49, 65
	// 3Class = 2, 18, 34, 50, 66
{
	PBYTE a_aIndex = 0;
	PBYTE b_mIndex = 0;

	a_aIndex = (PBYTE)a_gObjAddr;
	b_mIndex = (PBYTE)b_MonsterDataAddr;

	WORD mIndex = 0;
	WORD aIndex = 0;
	int vActive = GetPrivateProfileInt("DropZen","Active",1,".\\Config\\DropZen.cfg");
	int vDropZenPlus = GetPrivateProfileInt("DropZen","DropZenPlus",1,".\\Config\\DropZen.cfg");
	int vZenMoney = GetPrivateProfileInt("DropZen","ZenMoney",1,".\\Config\\DropZen.cfg");
	int vZenDrop = GetPrivateProfileInt("DropZen","ZenDrop",1,".\\Config\\DropZen.cfg");

	memcpy(&mIndex, b_mIndex+0x00,sizeof(WORD));
	memcpy(&aIndex, a_aIndex+0x00,sizeof(WORD));
	int Randomer = rand()%100+1;
	OBJECTSTRUCT *mObj = (OBJECTSTRUCT*) OBJECT_POINTER (mIndex);
	OBJECTSTRUCT *pObj = (OBJECTSTRUCT*) OBJECT_POINTER (aIndex);
	int MoneyMob = mObj->Money/Randomer;
	int Default = gEventMonsterItemDrop(b_MonsterDataAddr, a_gObjAddr);


	int StateMoney = vZenMoney;

	if (vActive == 1)
	{
		/*if (vDropZenPlus == 1)
		{
        if(Randomer < vZenDrop)
				{
		mObj->Money += StateMoney;
		return Default;
		}
		else
		{
		return Default;
		}
		}
		else
		{
		mObj->Money -= StateMoney;
		return Default;
		}*/

		mObj->Money =MoneyMob;
	}
	else
	{
		return Default;
	}
	return 1;
}
开发者ID:Natzugen,项目名称:reedlan-s3,代码行数:56,代码来源:DropZen.cpp


示例5: GCDamageSend

void GCDamageSend(int aIndex,int TargetIndex,int AttackDamage,int MSBFlag,int MSBDamage,int iShieldDamage)
{
    PMSG_ATTACKRESULT pResult;

#if (IS_PROTOCOL_JPN == 0)
    PHeadSetB((LPBYTE)&pResult,0x11,sizeof(pResult));	// (1.03P 1.03.16 main)
#else
    PHeadSetB((LPBYTE)&pResult,0xDC,sizeof(pResult));	// (1.03K 1.03.11 main)
#endif

    pResult.NumberH = SET_NUMBERH(TargetIndex);
    pResult.NumberL = SET_NUMBERL(TargetIndex);
    pResult.DamageH = SET_NUMBERH(AttackDamage);
    pResult.DamageL = SET_NUMBERL(AttackDamage);

    pResult.btShieldDamageH = SET_NUMBERH(iShieldDamage);
    pResult.btShieldDamageL = SET_NUMBERL(iShieldDamage);

    if(MSBFlag != false)
    {
        pResult.NumberH &= 0x7F;
        pResult.NumberH |= 0x80;
    }

    pResult.DamageType = MSBDamage;

    OBJECTSTRUCT * gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
    OBJECTSTRUCT * gTarg = (OBJECTSTRUCT*)OBJECT_POINTER(TargetIndex);

    pResult.Life = gTarg->Life;
    pResult.MaxLife = gTarg->MaxLife + gTarg->AddLife;

    pResult.X = gTarg->X;
    pResult.Y = gTarg->Y;

    if(gTarg->Type == OBJECT_MONSTER)
    {
        pResult.Life = gTarg->Life;
        pResult.MaxLife = gTarg->MaxLife + gTarg->AddLife;
    }

    if(gTarg->Type == OBJECT_USER)
    {
        DataSend(TargetIndex, (LPBYTE)&pResult, pResult.h.size);
    }

    if(gObj->Type == OBJECT_USER)
    {
        DataSend(aIndex, (LPBYTE)&pResult, pResult.h.size);
    }

    lpGCDamageSend(aIndex, TargetIndex, AttackDamage, MSBFlag, MSBDamage, iShieldDamage);
}
开发者ID:Natzugen,项目名称:IA-Julia-S4.6,代码行数:53,代码来源:HPBar.cpp


示例6: pop_window

si_t pop_window()
{
    switch(save_or_rename_flag)
    {
        case 0:
            save_window = window_init("save_directory_window");
            break;
        case 1:
            save_window = window_init("save_file_window");
            break;
        case 2:
            save_window = window_init("rename_window");
            break;
        default:
            break;
     }
    if(NULL == save_window)
    {
        //EGUI_PRINT_ERROR("failed to init save window");
		application_exit();
        return -1;
    }
    window_set_bounds(save_window,200, 200, 300, 60);
    window_set_color(save_window, NULL, &ground_purple);
    save_text_line = text_line_init(100, 0);
    if(NULL == save_text_line)
    {
        //EGUI_PRINT_ERROR("failed to init save_text_line on save window");
        application_exit();
        return -1;
    }
    text_line_set_bounds(save_text_line, 5, 5, 230, 50);
    text_line_set_placeholder(save_text_line, "input file name");
    text_line_set_color(save_text_line, &heavy_blue, NULL, &heavy_blue );
    save_button = button_init("OK");
    if(NULL == save_button)
	{
	    //EGUI_PRINT_ERROR("failed to init ok button on save window");
        application_exit();
        return -1;
	}
    button_set_bounds(save_button, 240, 10, 50, 40);
    button_set_color(save_button, &ground_purple, &heavy_blue );
    button_set_font(save_button, FONT_MATRIX_12);
	save_button->callback = rename_window_ok_button_callback;
    object_attach_child(OBJECT_POINTER(save_window), OBJECT_POINTER(save_button));
    object_attach_child(OBJECT_POINTER(save_window), OBJECT_POINTER(save_text_line));
    application_add_window(Desktop_w, save_window);
    return 0;

}
开发者ID:2742195759,项目名称:egui,代码行数:51,代码来源:right_click_menu.c


示例7: main

/*
    测试 eicon
*/
int main()
{
    si_t video_access_mode = VIDEO_ACCESS_MODE_BUFFER;
    ewindow * w;
    eicon * ic;

    /* 初始化用户应用程序 */
    application_init(video_access_mode, "eicon");

    /* 申请窗口 */
    w = window_init(1);
    /* 申请失败 */
    if(w == NULL)
    {
        application_exit();
        return -1;
    }
	window_set_bounds(w,300,100,500,200);
    w->title = "window with eicon";
    w->minimize_enable = 1;
    w->maximize_enable = 1;
    w->callback = window_default_callback;

    /* 申请按钮 */
    ic = icon_init(2);
    /* 申请失败 */
    if(ic == NULL)
    {
        application_exit();
        return -1;
    }
    icon_set_bounds(ic ,50,50,100,120);
	icon_set_text(ic,"ehello");
	icon_set_img_path(ic,"/home/orange/Egui2.0/img/2.bmp");
	icon_set_is_text_visiable(ic ,1);
    ic->callback = icon_default_callback;

    /* 将按钮添加到窗口 */
    object_attach_child(OBJECT_POINTER(w), OBJECT_POINTER(ic));

	/* 添加顶层窗口 */
    application_add_window(NULL, w);
    /* 设置主窗口 */
    application_set_main_window(w);

    /* 运行 */
    application_exec();

    return 0;
}
开发者ID:hanguangyi,项目名称:egui,代码行数:53,代码来源:test_icon.c


示例8: application_widgets_for_each_increament

static si_t
handle_window_deactivate
(union message * msg)
{
    struct widget* w;

    if(global_application.focus->descriptor == msg->base.window_descriptor)
    {
        global_application.focus = NULL;
    }

    w = application_widgets_for_each_increament(do_find_window, msg);
    if(w != NULL)
    {
        if(w->callback != NULL)
            w->callback(w, msg);

        dispatch_msg_to_subchilds(OBJECT_POINTER(w), MESSAGE_TYPE_WIDGET_REPAINT);

        /**
         * set every focus widget lose focus
         **/
        application_update_keybd_focus(NULL);
    }

    return 0;
}
开发者ID:hanguangyi,项目名称:egui,代码行数:27,代码来源:exec.c


示例9: CloseClientHook

//========================================================================================================================
void CloseClientHook(int aIndex)
{	
	if ( aIndex >= OBJECT_MIN && aIndex < OBJECT_MAX )
    {
		OBJECTSTRUCT *gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);

		if ( aIndex < 0 || aIndex > OBJECT_MAX-1 )
			return;

		if(gObj->Connected == 3)
		{
			if(gObj->Life <= 0)
			{
				//Log.outError("ResponErrorCloseClientHook");
				return;
			}
		}

		if(OfflineShop[aIndex].IsOffTrade != 0)
			return; 

		

		if ( gObj->Connected == PLAYER_EMPTY )
			return;

		if ( gObj->m_socket != INVALID_SOCKET )
		{
			closesocket(gObj->m_socket );
			gObj->m_socket = INVALID_SOCKET;
		}
	}
}
开发者ID:Natzugen,项目名称:reedlan-s3,代码行数:34,代码来源:offTrade.cpp


示例10: GCKillPlayerExpSendHook

void GCKillPlayerExpSendHook(int aIndex, int TargetIndex, int exp, int AttackDamage, BOOL MSBFlag)
{   
	// -----
	// -----
     OBJECTSTRUCT * lpObj = (OBJECTSTRUCT*) OBJECT_POINTER (aIndex);
     unsigned int pNewExperience = exp;
     unsigned int pBonusExp = 0;
     unsigned int pNewExperenceML = exp;
     unsigned int pBonusExpML = 0;
     // ----
     if(lpObj->pInventory[8].m_Type == 0x1A50) // Panda
     {          
          pBonusExp               = ((exp * Config.Panda.PetPandaExpirence) / 100);
          pBonusExpML               = ((exp * Config.Panda.PetPandaMLExpirence) / 100);
          // ----
          pNewExperience          += pBonusExp;
          pNewExperenceML          += pBonusExpML;
          // ----
          lpObj->Experience     += pBonusExp;
          lpObj->MLExp          += pBonusExpML;
     }

	if(lpObj->pInventory[10].m_Type == 0x1A4C || lpObj->pInventory[11].m_Type == 0x1A4C) // Panda Ring
     {          
          pBonusExp               = ((exp * Config.Panda.PandaRingExpirence) / 100);
          pBonusExpML               = ((exp * Config.Panda.PandaRingMLExpirence) / 100);
          // ----
          pNewExperience          += pBonusExp;
          pNewExperenceML          += pBonusExpML;
          // ----
          lpObj->Experience     += pBonusExp;
          lpObj->MLExp          += pBonusExpML;
     }
     GCKillPlayerExpSend(aIndex , TargetIndex , pNewExperience , AttackDamage , MSBFlag);
}
开发者ID:samik3k,项目名称:GreatDevelop-Julia-Project,代码行数:35,代码来源:User.cpp


示例11: ExpSystem

// -----------------------------------------------------------------------------------------------------------------------
//int VIPEXP = Experience + VIPExp;
// -----------------------------------------------------------------------------------------------------------------------
void ExpSystem(int aIndex, int TargetIndex, int Exp, int AttackDamage, BOOL MSBFlag)
{
    if (ExpSystemEnabled = 1)
    {
        OBJECTSTRUCT *gObj = (OBJECTSTRUCT*) OBJECT_POINTER (aIndex);
        unsigned int pNewExperience = Exp;
        unsigned int pBonusExp = 0;
        int ExpRes = 0;
        int ExpDel = (ExpSystempDel+1);
        int ExpS;
        if (SQL.ResetS > 30)
        {
            ExpS = 200;
        }
        if ((SQL.ResetS < 30)||(SQL.ResetS = 30))
        {
            ExpS = 100;
        }
        SQL.GetResetCharacter(gObj->Name);
        ExpRes = (ExpDel-SQL.ResetS);
        pBonusExp = ((Exp*ExpRes)/100);
        pNewExperience += pBonusExp;
        gObj->Experience += pBonusExp;
        GCKillPlayerExpSend(aIndex,TargetIndex,pNewExperience,AttackDamage,MSBFlag);
    }
    else
    {
        float * EXPERIENCE = (float *)(CGAddExperience);
        (*EXPERIENCE) = NormEXP;
    }
}
开发者ID:Natzugen,项目名称:reedlan-s3,代码行数:34,代码来源:ExpSystem.cpp


示例12: Connect

void CUserEx::Connect(int aIndex)
{
	if(!OBJMAX_RANGE(aIndex)) return;
	if(!gObjIsConnected(aIndex)) return;
			
	//LPOBJ * lpObj = (LPOBJ*)POBJ(aIndex);
	OBJECTSTRUCT * lpObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
	//Clear External Objectstructure
	LPOBJEX * lpObjEx = &gObjEx[POBJEX(aIndex)];
	lpObjEx->Clear();

	//LogAddC(LOG::BLACK,"[UserEx](%s)(%s) Player Connect (%d,%d)",lpObj->AccountID,lpObj->Name,lpObj->Index,POBJEX(aIndex));

	//GCServerMsgStringSendEx(aIndex,1,"Server powered by XtremeCoderz");
	//GCServerMsgStringSendEx(aIndex,0,CommonServer.ConnectMessage);
	//Send Player enter In Game
	//Msg.Send(POST::WHISHPER,-1,Msg.Get(CMSG::ETC,0),lpObj->Name);

	//AutoAdd Helper Extension
	/*if(CommonServer.AddHelperExtensionBuff == true)
	{
		gObjAddBuffEffect(lpObj,BUFFTYPE_MACRO_PAID_EXTENSION,0,0,0,0,((3600 * 24) * 30));
	}*/
#if(COMPILE_CASHSHOP==1)

#endif

	//Request UserEx Data
	//this->RequestExData(aIndex);

	//Request VIP
	//VIPSystem.RequestVIP(aIndex);
}
开发者ID:ashllay,项目名称:RZ-Project-Ex901,代码行数:33,代码来源:UserEx.cpp


示例13: save_depth

void save_depth(struct node_t *tree)
{
    struct node_t *it;
    for (it = object_tree_l_most_node(tree->obj.parent); it;
         it = object_tree_iterator_increment(tree->obj.parent,
                                             OBJECT_POINTER(it))) {
        struct node_t *par =
            (struct node_t *)object_parent(OBJECT_POINTER(it));
        if (par) {
            it->data.depth = par->data.depth + 1;
        }
        else {
            it->data.depth = 0;
        }
    }
}
开发者ID:FangKuangKuang,项目名称:egui,代码行数:16,代码来源:object.c


示例14: ApplyVip

void CVipSystem::ApplyVip(int aIndex)
{
	OBJECTSTRUCT *pObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
	if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 0)
	{
		char lvlmsg[100];
		sprintf(lvlmsg,"[Free] Welcome back, [ %s ].", pObj->AccountID);
		GCServerMsgStringSend(lvlmsg,aIndex,1);
	}
	if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 1)
	{
		pObj[aIndex].m_wItemDropRate += this->m_PlatinumDrop;
		char lvlmsg[100];
		sprintf(lvlmsg,"[Bronze VIP] Welcome back, [ %s ].", pObj->AccountID);
		GCServerMsgStringSend(lvlmsg,aIndex,1);
	}
	else if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 2)
	{
		pObj[aIndex].m_wItemDropRate += this->m_PlatinumDrop;
		char lvlmsg[100];
		sprintf(lvlmsg,"[Platinum VIP] Welcome back, [ %s ].", pObj->AccountID);
		GCServerMsgStringSend(lvlmsg,aIndex,1);
	}
	else if(Vip[pObj[aIndex].m_Index - OBJECT_MIN] == 3)
	{
		pObj[aIndex].m_wItemDropRate += this->m_GoldDrop;
		char lvlmsg[100];
		sprintf(lvlmsg,"[Gold VIP] Welcome back, [ %s ].", pObj->AccountID);
		GCServerMsgStringSend(lvlmsg,aIndex,1);
	}
}
开发者ID:Natzugen,项目名称:EvolutionTeam-s2,代码行数:31,代码来源:VipSystem.cpp


示例15: GCEquipmentSendHook

void GCEquipmentSendHook(int aIndex)
{							
	OBJECTSTRUCT * gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);

	GCEquipmentSend(aIndex);
	
	//Fix Double Pets on trade cancel/ok/success
	if(gObj->pInventory[8].m_Type != SLOT_EMPTY)
	{
		if(gObj->pInventory[8].m_Type == 0x1A50 || gObj->pInventory[8].m_Type == 0x1A7B)
		{	
			CItem OldItem;
			OldItem = gObj->pInventory[8];
			gObj->pInventory[8].m_Type = -1;

			gObjMakePreviewCharSet(aIndex);
			GCItemListSend(aIndex);
			gObjViewportListProtocolCreate(gObj);

			gObj->pInventory[8] = OldItem;

			gObjMakePreviewCharSet(aIndex);
			GCItemListSend(aIndex);
			gObjViewportListProtocolCreate(gObj);
		}
	}
	
	if(gObj->pInventory[RING_01].m_Type == 0x1A7A 
		|| gObj->pInventory[RING_02].m_Type == 0x1A7A) //Skeleton Ring
		_beginthread( TradeSystem__Cancel, 0, NULL  );
}
开发者ID:samik3k,项目名称:GreatDevelop-Julia-Project,代码行数:31,代码来源:User.cpp


示例16: RemoveMoney

int CPlayer::RemoveMoney(int Count)
{	
	OBJECTSTRUCT *gObj = (OBJECTSTRUCT*)OBJECT_POINTER(this->aIndex);
	gObj->Money -= Count;
	GCMoneySend(aIndex,gObj->Money);
	return 0;
}
开发者ID:ElBedeawi,项目名称:open-mu-online-server,代码行数:7,代码来源:Player.cpp


示例17: CloseClient2Hook

//========================================================================================================================
void CloseClient2Hook(_PER_SOCKET_CONTEXT * lpPerSocketContext, int result)
{
    int index = -1;
    index = lpPerSocketContext->nIndex ;    

    if ( index >= OBJECT_MIN && index < OBJECT_MAX )
    {	
		OBJECTSTRUCT *gObj = (OBJECTSTRUCT*) OBJECT_POINTER(index);

		if(gObj->Connected == 3)
		{
			if(gObj->Life <= 0)
			{
				//Log.outError("ResponErrorCloseClientHook");
				return;
			}
		}

        if(OfflineShop[index].IsOffTrade != 0)
            return;

        if ( gObj->m_socket != INVALID_SOCKET )
        {
            if (closesocket(gObj->m_socket) == -1 )
            {
                if ( WSAGetLastError() != WSAENOTSOCK )
                    return;
            }
            gObj->m_socket = INVALID_SOCKET;

	
        }
        gObjDel(index);
    }
}
开发者ID:Natzugen,项目名称:reedlan-s3,代码行数:36,代码来源:offTrade.cpp


示例18: shortcut_delete

si_t shortcut_delete(struct shortcut* sh_ptr){
	int number = vector_find(&sh_desktop_vector, sh_ptr, link_file_cmp);
	if(number>=0){
		object_remove(OBJECT_POINTER(sh_ptr));
		//object_delete(OBJECT_POINTER(sh_ptr),_widget_destructor);
		//vector_erase(&sh_desktop_vector,number);
		//位置清除
		flag_pptr[sh_ptr->position_x][sh_ptr->position_y]=0;
		app_number--;
		
		pid_t pid;
		if((pid = fork()) == 0)
    	{
    		if(strcmp(sh_ptr->app_name,"file_browser")==0 && sh_ptr->is_real==1){
        		//execl("/bin/rm", "rm",sh_ptr->link_file_path, NULL);
				//exit(0);
				//delete_file(sh_ptr->link_file_path);
				//rmdir(sh_ptr->link_file_path);
				//exit(0);
			}
        	else if(sh_ptr->is_real==1)
           	 	execl("/bin/rm", "rm", sh_ptr->link_file_path, NULL);
        }
		
	}
	return 0;
}
开发者ID:2742195759,项目名称:egui,代码行数:27,代码来源:right_click_menu.c


示例19: memcpy

/*void OffTradeLogin(int aIndex,LPBYTE aRecv)
{
	PMSG_IDPASS *lpMsg = (PMSG_IDPASS*)aRecv;

	char AccountID[11];
	AccountID[10] = 0;
	memcpy(AccountID,lpMsg->Id,sizeof(lpMsg->Id));
	BuxConvert(AccountID,10);

	for(int i = OBJECT_MIN; i<OBJECT_MAX;i++)
	{
		OBJECTSTRUCT *lpObj = (OBJECTSTRUCT*)OBJECT_POINTER(i);

		if(lpObj->Connected == 3)
		{
			if(!strcmp(AccountID,lpObj->AccountID))
			{
				if(OfflineShop[i].IsOffTrade == 1)
				{
					GJPUserClose(lpObj->AccountID);
					g_Console.ConsoleOutput(4,"[OFFTRADE][%s][%s] Close Offline Shop",lpObj->AccountID,lpObj->Name);
					//LogAdder ("OFFTRADE","Close Offline Shop",i);
					gObjDel(i);
					OfflineShop[i].IsOffTrade = 0;
					//SQL.OffTradeOff(aIndex);
				
				}
			}
		}


	
	}
}*/
void OffTradeLogin(int aIndex,LPBYTE aRecv)
{
	PMSG_IDPASS *lpMsg = (PMSG_IDPASS*)aRecv;

	char AccountID[11];
	AccountID[10] = 0;
	memcpy(AccountID,lpMsg->Id,sizeof(lpMsg->Id));
	BuxConvert(AccountID,10);

	for(int i = OBJECT_MIN; i<OBJECT_MAX;i++)
	{
		OBJECTSTRUCT *lpObj = (OBJECTSTRUCT*)OBJECT_POINTER(i);

		if(lpObj->Connected == 3)
		{
			if(!strcmp(AccountID,lpObj->AccountID))
			{
				if(OfflineShop[i].IsOffTrade == 1)
				{
					GJPUserClose(lpObj->AccountID);
					g_Console.ConsoleOutput(4,"[OFFTRADE][%s][%s] Close Offline Shop",lpObj->AccountID,lpObj->Name);
					//LogAdder ("OFFTRADE","Close Offline Shop",i);
					gObjDel(i);
					OfflineShop[i].IsOffTrade = 0;
					//SQL.OffTradeOff(aIndex);
				}
			}
		}
	}
}
开发者ID:Natzugen,项目名称:reedlan-s3,代码行数:64,代码来源:offTrade.cpp


示例20: panel_default_mouse_release

si_t panel_default_mouse_release(struct panel* pnl , union message * msg)
{
/*	panel_event_in_which_widget(pnl, msg);*/
	si_t flag = 0;
	struct widget * wgt;

	struct rectangle area;

	struct object * tree, *node ;

	tree = OBJECT_POINTER(pnl);
	node = tree->rchild;
	while(node != NULL)
	{
		widget_absolute_area(WIDGET_POINTER(node), &area);
		if(point_in_area(&(msg->mouse.cursor_position), &area))
		{
			wgt = (struct widget*)node;
			wgt->callback(wgt, msg);
			flag = 1;
			break;
		}
		node = object_tree_iterator_decrement(tree,node);

	}
	if(flag == 0)
	{
		/* 
		 * panel doesn't have children.
		 * so ,do nothing
		 * */
	}
	return 1;
}
开发者ID:hanguangyi,项目名称:egui,代码行数:34,代码来源:panel.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ OBJ_CONSTRUCT函数代码示例发布时间:2022-05-30
下一篇:
C++ OBJECTHDR函数代码示例发布时间: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